View Full Version : setTimeout()
premshree
08-21-2002, 03:14 PM
Please help me with this line :
setTimeout("funcName('+arg1+','+arg2+','+arg3+','+arg4+')",arg4)
I want to pass arg1, arg2, arg3, arg4 as arguments to the function funcName().
I am having probs using this line.
mordred
08-21-2002, 03:18 PM
setTimeout("funcName('" +arg1+"','" +arg2+'",'"+arg3+"','"+arg4+"')",arg4);
does that work for you?
adios
08-21-2002, 06:30 PM
setTimeout('funcName('+arg1+','+arg2+','+arg3+','+arg4+')',arg4);
You'll only need the extra quotes if the function requires them; this varies from case to case (sometimes strings won't be evaluated as such unless they're there.
A memo to the mods: why is this editor randomly wrapping posted strings - it ruins a lot of code that way. vBulletin doesn't generally do that - a switch?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.