Page is a not externally linkable
le_gber - 4:41 pm on May 8, 2009 (gmt 0)
I needed i because part of my function also checks the form default value array against it. a more complete version of the function would be: if(this.value==''){ this.value=smallFormVal[f]; }
whoisgregg thanks for your reply.
window.onload = function(){
if(document.getElementById('myform')){
ffields = document.getElementById('myform').getElementsByTagName('input');
var formDefaultVal = new Array("name", "surname","email");
for(f in ffields){
ffields[i].onclick = function(){ if(this.value==smallFormVal[i]){ this.value=''; }}
ffields[i].onblur= function(){ if(this.value==''){ this.value=smallFormVal[i]; }}
}
}
}