Welcome To Snipplr


Everyone's Recent JavaScript Snippets



1 ... 41 42 43 44 45 ... 65
XHTML 1.0 Strict deprecates the use of iframes in favor of objects. While this has gotten a lot of flack, iframes were never truly a part of HTML, just a proprietary element in Internet Explorer that eventually got universal support. Objects are a mo...
0 720 posted 14 years ago by chrisdpratt
0 1457 posted 14 years ago by powerserve
Puts a red border around anything with an inline style. Prefix with "javascript:" and paste into the address bar to run on a page directly, or run with a load event.
1 558 posted 14 years ago by DaveChild
0 844 posted 14 years ago by enchance
<form> <input>
0 724 posted 14 years ago by hotdiggity
1 566 posted 14 years ago by mcarneiro
W3C no longer include the target attribute of the <a> tag in HTML 4.0 Strict and XHTML 1.0 Strict document types . To make links open new windows we will have to use Javascript, and with mootools it make this task very easy. Just add this snippet to...
0 662 posted 14 years ago by cherrywaves
Use this function to test whether or not a Javascript object is empty.
2 826 posted 14 years ago by jlizarraga
I just noticed in Firefox 3.5.2 that setting `disabled = true` for a focused text input seems to make it impossible to re-focus after setting `disabled = false`. The solution is to blur it before disabling.
0 1068 posted 14 years ago by cyberhobo
first of all i thank to our Creator and Mr.ImHugo for his Action script which i make the java script from it,its works fine and once again i gives thank him for his snippet
1 595 posted 14 years ago by sujithfem
I saw a lot of bad javascritp foreach examples ... so here is the best solution. See the link (german) for another snippet to iterate over object properties via foreach.
0 351 posted 14 years ago by naden
Page_ClientValidate is a global function. When called this will return true/false if the validator group provided is valid or not.
0 599 posted 14 years ago by jink
Usage: //any element window.onload = function(){ focusFirstInput(); } or // form elements under 'content-body' window.onload = function(){ focusFirstInput('content-body'); }
0 622 posted 14 years ago by neoprolog
0 471 posted 14 years ago by iTony
The code below will loop through the properties in an object and alert a string. myObject is in JSON notation. The "for ( x in y)" construct does not work if the Prototype.js library is included on the page
0 1011 posted 14 years ago by elugardo
Make sure you change the variable v_ga_track near the end of the script.
0 543 posted 14 years ago by chrisjlee
Detect if an object exists in an array or detect existance of a key in an object
1 557 posted 14 years ago by quickredfox
File.Basename - A library that provides unix-like tools 'dirname' and 'basename'
0 454 posted 14 years ago by quickredfox
Remedial Javascript As Proposed by Douglas Crockford (http://javascript.crockford.com/remedial.html)
0 518 posted 14 years ago by quickredfox
The canvas drawImage size default is 300 x 150, so it's using the CSS to resize the canvas. Example posted at http://pastebin.me/76aed7005b1b413ea3c479287f4dbd59
0 1121 posted 14 years ago by Motty
Checks if value is an e-mail.
1 581 posted 14 years ago by NyX
1 ... 41 42 43 44 45 ... 65