1 2 3 4
function calc_color(value, start, end, min, max) { var n = (value - min) / (max - min); var s = parseInt(start.replace("#", ""), 16); ...
JavaScript Hex color between two colors
1 2 3 4
javascript:(function(){ var elm = document.getElementsByTagName("img"); for (var i = 0; i < elm.length; i++) { ...
JavaScript Zoom all image files from s...
This one comes straight fro...
1 2 3 4
javascript: popw=''; y=window; ...
JavaScript Mathtex bookmarklet
Join the lines and save it ...
1 2 3 4
function odump(object, depth, max){ depth = depth || 0; max = max || 2; ...
JavaScript Recursively dump an object
Given an object, iterate th...
1 2 3 4
check out: http://www.thethirteenthstory.com/WFCINC/site/ the menus grow in IE, fine in all other browsers ...
JavaScript growing menus ?
i know this isn't a help fo...
1 2 3 4
function showEMail() { var e = [ 'm','y','e','m','a','i','l','@','x','y','z','.','c','o','m' ]; var s = ''; ...
JavaScript Anti-spam Mailto
Here's a straightforward an...
1 2 3 4
<html> <head> <title>My Experiment</title> ...
JavaScript How to Refactor from a Loop...
by Jermaine,
December 31, 2007 09:59,
17 refactorings
Hi Everyone,
I'm having...
1 2 3 4
/* Example Usage: new ImagePreloader({ ...
JavaScript Image Preloader
by getopenid.com/deleteme,
December 26, 2007 20:34,
No refactoring, tagged with javascript, image, preloader, images
I'm looking at the 'createI...
1 2 3 4
<html> <head> <title>Print Image Only</title> ...
JavaScript print an image
by cuaddu.myopenid.com,
December 26, 2007 15:30,
4 refactorings
Hi! I was searching a solut...
1 2 3 4
function full_reset(form) { cost_per_unit.innerHTML = "" charge_per_unit.innerHTML = "" ...
JavaScript Repetitive Calculator Code
I am almost embarrassed to ...
1 2 3 4
function startup() { setInterval(”pinger(’live’,0)”,10000); setInterval(”pinger(’standby’,1)”,10000); ...
JavaScript Javascript threading
by Dan Simard,
December 06, 2007 14:06,
6 refactorings
This submission is from a q...
1 2 3 4
//creation and affectation myArray= new Array(); myArray[2]='something'; ...
JavaScript Get the last key
by jojolapine,
December 06, 2007 11:42,
9 refactorings
I have to get the last key ...
1 2 3 4
function calcVitesse(){ var tempsTab = document.forms.adminForm.temps.value.split(':'); var kilometrage = document.forms.adminForm.kilometrage.value; ...
JavaScript Amélioration d'une fonction JS
by Sebe,
November 30, 2007 09:12,
3 refactorings
Bonjour,
N'étant pas un ...
1 2 3 4
function thousdands(num, decpoint, sep){ if (arguments.length == 2) { sep = ","; ...
JavaScript Thousands
Formats numbers with thousa...
1 2 3 4
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> ...
JavaScript ajax star rater using mootools
by blank714.myopenid.com,
November 21, 2007 08:00,
4 refactorings, tagged with mootools, ajax, star rating
i know theres a lot of star...
1 2 3 4
Element.addMethods({
pngHack: function(el){
var el = $(el);
...
JavaScript pngHack
by getopenid.com/deleteme,
November 15, 2007 03:40,
1 refactoring, tagged with rails, png, image, img, prototype, hack
Makes 32 bit PNG's transpar...
1 2 3
//function that loops through the elements function __validateForm(theform){ ...
JavaScript Simple form validator with ...
by eljota,
November 11, 2007 10:32,
4 refactorings, tagged with js, javascript, form, validation, regex
This is a real simple form ...
1 2 3 4
<script type="text/javascript"> window.onload = function() { ...
JavaScript Shorten links
is there a better, shorter,...
1 2 3 4
var Fenster = null; function neuesFenster(meineSeite,meinName,w,h,scroll){ LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; ...
JavaScript Unobstrusive changing of im...
I am pretty new to javascri...
1 2 3
document.write ('<noscript>\n'); document.write (imageClick); document.write ("</noscript>");
JavaScript I care about older browsers...
by Gary Haran,
October 30, 2007 22:30,
3 refactorings
I found this great piece of...
1 2 3
function toUpperCase( str : String ):String { ...
JavaScript Uppercase a string, but ski...
I had to do this on my curr...
1 2 3 4
<script type="text/javascript"> var feature_stuff = new Array( '<li><a href="#">URL 1</a></li>', ...
JavaScript Random URL
Outputs one of the 5 urls r...
1 2 3 4
#Functions [javscript] var ms = 0; var state = 0; ...
JavaScript Stop Watch
by richardhealy,
October 27, 2007 13:31,
3 refactorings, tagged with time, clock, speed, test, javascript
I use this to test speed of...
1 2 3
/* Set some variables */
...
JavaScript ImageFlow - something like ...
by admiralquade,
October 25, 2007 14:54,
13 refactorings
Hi there, I wrote a javascr...
1 2 3 4
function curry(fn, scope) { var scope = scope || window; ...
JavaScript Curry
by richardhealy,
October 18, 2007 09:34,
6 refactorings
I use this little function ...
Watch out for edge cases, l...