Welcome To Snipplr
Everyone's Recent JavaScript Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
A Tiny JavaScript liberary for Behaviour-Driven Development (BDD).
1
1566
posted 17 years ago by ishikawa
This is the javascript file for code which implements the Secure Hash Algorithm 1 as defined in FIPS 180-1 published April 17, 1995.
1
1818
posted 17 years ago by ishikawa
I've been using this little gem of a snippet for a few years, and it's never failed me.
1
1319
posted 17 years ago by bmayzure
After having trouble with xss and .getJSON() I wrote this. Solved my problems so here you go.
3
1380
posted 17 years ago by twoism
Slim down the size of your javascript by using these custom functions.
2
1282
posted 17 years ago by neal_grosskopf
This gets the current page addr. and send it...
Modify form action="" to send values to proper mail function - or - class.
3
1711
posted 17 years ago by skywalker
I use this in addition to the
number_format (http://snipplr.com/view/5945/javascript-numberformat--ported-from-php/)
snippit in SWFUpload to display the size of files a user is preparing to upload.
0
6414
posted 17 years ago by inkdeep
Name the form what ever you like, but make sure that is reflected in the javascript.
0
5755
posted 17 years ago by jachin
From: David Walsh.
http://davidwalsh.name/dw-content/open-links.php
2
2094
posted 17 years ago by gbot
/* if (globalVariable) {
But this wouldn't work. That code is actually checking to see if the defined variable globalVariable has a null value. If the variable has not been defined, that code will cause an error.
Instead, here is the code that...
0
1103
posted 17 years ago by zha
i found this snippet here on snipplr (see the link up above), and really liked it. it came up with a validation error under XHTML 1.0 Strict so i changed it to what you see in the bottom.....
1
1362
posted 17 years ago by pufftenticle
Note that the comment is part of the code here. IE 5+ (including Mac) will evaluate to true by using conditional compilation.
0
1427
posted 17 years ago by cczona
Sometimes i forget to remove firebug console commands when debuging, which makes IE and some other browsers fail / cry.
To stop this happening use the below script from firebugx.js on the firebug lite homepage.
3
1663
posted 17 years ago by 1man
I know what you think - no discussion about this needless piece of code to prevent copying texts/images from websites, but there are customers outside that are advising resistant and so I use this code to scare off their potential clienteles.
2
1955
posted 17 years ago by localhorst
*"Only the elements which are are selected through the $ selector will get the extra DOMAssistant methods added to it."
0
1118
posted 17 years ago by cczona
This is a little trick I came up with to add outerHTML functionality in Firefox. For those who aren't familiar with outerHTML, it is an IE addition to the DOM that will return the element's HTML PLUS it's innerHTML. Is it really needed? No, but it ca...
1
2451
posted 17 years ago by localhorst
How to use:
1) < script type="text/javascript" src="path-to-file.js"...
2) < body onload="oHW.preMontar('img1_on.jpg','img2_on.jpg','img3_on.jpg');"...
3) < a href="#" onmouseout="oHW.Restore()" onmouseover="oHW.Cambiar('mnind','img1_on.jpg'...
2
1882
posted 17 years ago by hellion
I'm sure i can clean this up quite a bit, but it works for the moment.
This function looks to see if you are on a selected page. If you are it hides the navigation, then loops through and shows each li one after the other. So they don't all fade i...
0
1428
posted 17 years ago by 1man