Posts Tagged ‘javascript’

UK Postcode Mapper Firefox extension is now open-source

I have now made the UK Postcode Mapper Firefox extension open source, after a user suggestion on this blog. I initially decided to create this extension as a way to learn more about Firefox and javascript. Since the first build I have updated it twice, but don’t have time to maintain it anymore, so making […]

Using an ‘onclick’ event to dynamically load a SWF

Here is an excellent post about how to use an ‘onclick’ event to dynamically load a SWF. The great thing about this example is that the javascript will dynamically add or remove the required DIV tag needed to embed the SWF. link

UK Postcode Mapper Firefox Plug-in updated

I’ve just updated UK Postcode Mapper Firefox plug-in to support Firefox version 3.5.* Once you’ve added the button to your toolbar, you can see any UK post code on a map in only two clicks.

Firefox Extension – reviews needed!

My first Firefox Extension UK Postcode Mapper has had over 100 downloads now but only one review. It will not leave the ‘experimental’ sandbox until it has more than 4 reviews. If anyone could please download it and review it (there really isn’t that much to it), it would be appreciated!

UK Postcode Mapper – Firefox Extension

Download the UK Postcode Mapper Firefox extension here: UK Postcode Mapper This is my first Firefox Extension. It searches the current page you are browsing for any UK Postcode. It then shows you a list of all postcodes on a small popup window. Then you just click on the postcode you would like to see […]

FlashVars AS3 – getting values from the URL string

Getting values from the URL string in AS3 isn’t very complicated. First you need to set up your html to pass these into the SWF using a javascript function:  <script language="javascript">function gup(name){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == […]

Getting FlashVars from the URL – javascript function

Here’s a very handy javascript function to grab FlashVars from the URL. ‘GUP’ Get URL Parameters can sit in your html or in an external js file. function gup(name){ name = name.replace(/[\[]/,”\\\[“).replace(/[\]]/,”\\\]”); var regexS = “[\\?&]”+name+”=([^&#]*)”; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return […]

Opening Pop-up windows from Flash

Recently I read that the best way to open pop-up windows from Flash was to use the ExternalInterface class. I found some code that looked good but it didn’t work in Safari on a Mac. if (ExternalInterface.available) {“”, “popup.html”, “win”, “height=300, width=400, toolbar=no, scrollbars=yes”); } else { getURL(‘popup.html’, ‘_blank’); } However it isn’t that […]

URL encoding in Javscript

After almost freaking out about a problem with FlashVars and a URL string variable that contained many ampersands (&) I couldn’t work out how to pass the URL in without Flash splitting the string up into separate variables until I came across this lovely JS function encodeURIComponent(…) This is a good one to remember