Return to Snippet

Revision: 2347
at February 3, 2007 03:22 by assbach


Initial Code
function dummyreg() {
	var currentTime = Date.parse(new Date());

	document.getElementById("nickname").value = "dummynick" + currentTime;
	document.getElementById("checkbox").checked = true; // checkbox
	document.getElementById("radiobutton").checked = true; // radiobutton
	document.getElementById("pulldown").selectedIndex = 2; // dropdown
			
}

Initial URL

                                

Initial Description
when testing forms you don't always want to fill in dummydate
this is a function i used to autofill and select values.

Initial Title
autofill and select formfields for debugging

Initial Tags
javascript, js, forms

Initial Language
JavaScript