thisisnuts123 Posted November 3, 2007 Share Posted November 3, 2007 function sitepop(ret_value){ var uuu = ret_value; setTimeout("alert(uuu);", 2000); } this gives me uuu un defiend any ideas to why? if i change this to the followingthen it works function sitepop(ret_value){ var uuu = ret_value; alert(uuu); } how can i do this with a delay?? thanks!!! Quote Link to comment Share on other sites More sharing options...
mainewoods Posted November 3, 2007 Share Posted November 3, 2007 the uuu variable has only local scope and is destroyed after the function returns. try this instead: function sitepop(ret_value){ var uuu = ret_value; setTimeout("alert('" + uuu + "');", 2000); //i'm adding single quotes around the parameter } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.