Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged javascript



1 ... 26 27 28 29 30 ... 33
0 1664 posted 17 years ago by wizard04
0 1725 posted 17 years ago by wizard04
0 1440 posted 17 years ago by wizard04
NOT MY CODE. I was looking for a good code that would validate the date in JavaScript and I found this function. I thought it was worth keeping so I decided to post it on here as opposed to clutter my bookmarks with one more link. Once again I take...
0 1733 posted 17 years ago by ckester
Requires Mootools 1.2<br/> http://mootools.net/download Based on the mootools javascript framework a re-usable class for easily implementing an array of on submit events. * Confirmation - Provides an Ok, Cancel input box before proceeding furt...
1 1713 posted 17 years ago by dom111
0 1574 posted 17 years ago by wizard04
When there's a URL on a page that's not a link, just highlight it and click this bookmarklet. The URL will open in a new window. If there are multiple selections (e.g., if you've selected something in each of two frames on the page), they will eac...
1 1645 posted 18 years ago by wizard04
Convert a number to a different base.
0 1950 posted 18 years ago by wizard04
Select some text, click the bookmarklet, and the definition(s) will open up in [Ninjawords](http://www.ninjawords.com). [Ninjawords](javascript:(function(&#41;{function%20t(f&#41;{try{if(f.getSelection&#41;return%20f.getSelection(&#41;.toString(&#...
0 1311 posted 18 years ago by wizard04
This simple little snippet will allow you to change two iframes with the click of just one link.
1 1812 posted 18 years ago by aristoworks
0 1432 posted 18 years ago by fredaudet
`Events.add(element, type, handler)` adds a handler to an element `Events.remove(element, type, handler)` removes a handler from an element `Events.getTarget(event)` or `Events.getOrigin(event)` returns the element from which the event originat...
1 2097 posted 18 years ago by wizard04
Functions to use the clipboard. Requires a Flash file for non-IE browsers: see [http://javascript.internet.com/forms/clipboard-copy.html](http://javascript.internet.com/forms/clipboard-copy.html) Remember to set `config.Clipboard.pathToFlash` a...
1 1544 posted 18 years ago by wizard04
There is no standard for this at all - this just looks for the hooks that exist in IE and gecko-type browsers. See also http://msdn.microsoft.com/en-us/library/ms535926(VS.85).aspx and http://developer.mozilla.org/en/docs/DOM:window.sidebar
3 1821 posted 18 years ago by scarfboy
Exploits hash keys uniqueness, but in doing so effectively toString()s everything, meaning this should not be used for much beyond strings and perhaps integers. I used this when I wanted to do some client-side filtering of (integer) identifiers.
1 1639 posted 18 years ago by scarfboy
Useful functions to get around browser incompatibilities when working with stylesheets. If you find any errors, please leave a comment.
0 1772 posted 18 years ago by wizard04
sample: var text = " string content "; text = text.trim();
2 1648 posted 18 years ago by donkeykong
Use sample: var inputTxt = getElementsByAttr('input', 'type', 'text');
1 1538 posted 18 years ago by kcmr
8 2115 posted 18 years ago by mdi
Firefox ignores the alt tag on images and uses the title tag whereas IE uses the alt tag. This javascript code copies the text in all image alts to the image's title. Best when placed at the footer of each page
1 1907 posted 18 years ago by ezerick
1 1723 posted 18 years ago by rwczippy
1 1728 posted 18 years ago by ezerick
I wrote this very quickly for a form I parse that allows a user to send a page to up to 5 friends. The script adds a click event to an image of a + sign beside an input box. When clicked if the user hasn't already added 5 friends to email, additional...
9 2349 posted 18 years ago by dmosher
1 ... 26 27 28 29 30 ... 33