Subscribe to
Posts
Comments

Archive for the 'Javascript' Category

Pub Finder

I’ve got my Google Maps / Beer In The Evening mashup working again. Seems I completely missed the Google Maps API V2 changes which broke the layout and the ‘link to this pub’ links. Unfortunately I still can’t get my CSS to expand the map to the available screen size so if anyone has any [...]

This is interesting, a port scanner written completely in Javascript. It creates a series of image objects and points the URL to an image file which would be found on a default installation of some web servers. Once found, the script could be modified to do something malicious to that webserver using any well known [...]

In your ASPX page, add the following such that it renders in the top-right of the popup window And add this code such that it renders in the bottom-left of the popup window Then add the following Javascript to your page and make a call to resizeThisWindow(). // Default window dimensions to add to the [...]

Taken from this blog is a technique which will postback the form when you hit enter. If you use the script below, it will work in any browser (although bypassing any onClick code for the button specified). function clickButton(e, buttonid) { var bt = document.getElementById(buttonid); if (typeof bt == ‘object’) { try { if(navigator.appName.indexOf("Netscape")>(-1)) { [...]

This will link to an external Javascript file. You need the charset attribute if your external file is using international symbols (e.g. £ or $). Also, don’t use inline regular expressions (var rex = /foo/gi;) instead use proper object definitions (var rex = new RegExp(“foo”, “gi”);) <script charset=”ISO-8859-1″ type=”text/javascript” xsrc=”/money.js” mce_src=”/money.js”></script>

Signature for custom method is function foo(val, args) { // test the controls (not sure what val argument is though…?!) args.IsValid = true | false; }