Oziam
02-03-2011, 12:43 AM
hi,
I am trying to set a timeout then call another function
after timeout expires, this works OK using;
setTimeout("processForm()", 1500);
it works fine if I have the processForm variables already predefined,
e.g
var formname = 'form1';
function processForm(){
// do something with formname
}
but if i try to pass them within the setTimeout function it doesn't work?
e.g
setTimeout("processForm(formname)", 1500);
function processForm(formname){
// do something with formname
}
this will result in undefined formname error!
I have tried to remove and change the quotes around but still get errors??
any Ideas please
I am trying to set a timeout then call another function
after timeout expires, this works OK using;
setTimeout("processForm()", 1500);
it works fine if I have the processForm variables already predefined,
e.g
var formname = 'form1';
function processForm(){
// do something with formname
}
but if i try to pass them within the setTimeout function it doesn't work?
e.g
setTimeout("processForm(formname)", 1500);
function processForm(formname){
// do something with formname
}
this will result in undefined formname error!
I have tried to remove and change the quotes around but still get errors??
any Ideas please