Javascript

Code Snippet NameSort by Category CategorySort by Category Submitted BySort by Person   Date

External Interface

Javascript 06/08/10
This is the ultimate snippet in the universe. Use this technique to communicate back and forth between actionscript and javascript. The other files you need are attached to this post, click on the download source files button to get them. Basically this uses the External Interface class to ... View Code

Tags

Swf Object dynamic resize

Javascript 06/08/10
Took me a couple of hours to figure this one out. When I set the swf object height to 100% the swf kept disappearing. The css block is the key to getting this to work, otherwise as soon as you set the height to 100% the swf disappears. View Code

Tags

Link MouseOver sound

Javascript 05/05/10
Add the JS to your html file and then paste the link below the js into your html where needed. This script does not preload but it is so simple it deserves to be on this site. View Code

Tags

Replace character onBlur

Javascript 04/04/10
This code is designed to replace double quotes with single quotes in an html form using javascript. Pretty specific but it is easy to replace the inChar and outChar variable with whatever you want. Note that the quotes are escaped with a backslash. You wont need the backslash if you are ... View Code

Tags

Dynamic form input field value

Javascript 03/21/10
This is a javascript and html combo that enables you to change the value of an html input field with javascript on the fly. This example uses a select menu to trigger the change. When the select field is changed it dispatches the 'onchange' event and causes the javascript to chang the input ... View Code

Tags

Refresh parent of an iframe

Javascript 03/15/10
This javascript and html combo creates a button that when clicked on refreshes the parent page. This is meant for home type links within an iframe. View Code

Tags

Clear Form Field

Javascript 03/14/10
This javascript clears the form field when the user clicks on it with the mouse. View Code

Tags

Google Maps template

Javascript 03/05/10
This is an example Google Maps script for your web site. I wrote the javascript myself based on the examples on Google's web site. This one creates a custom icon with your own image and also has popup balloons and mouse click events that make it all work so well. This is a basic example but it ... View Code

Tags ,

Copy Div content to Clipboard

Javascript 01/31/10
This little jem copies the contents of a DIV to a text area so that javascript can intern sent that to the clipboard using a 'copy' button.

Note: This does not work in Firefox as show in the comments but works in IE8

The code should be usefull for reference View Code

Tags

Copy to Clipboard Button

Javascript 01/31/10
This code is easily pasted into your HTML document. It creates a text area that has text that will be copied to the clipboard of the local machine when you click on the 'Copy to Clipboard' button View Code

Tags