severndigital Posted October 21, 2008 Share Posted October 21, 2008 i have function function testFunc(var1, var2) { write var1; write var2; } then i refernce it <input type="text" name="textfield" onblur="testFunc('Variable1','Variable2');"> when i try to execute the function all the error says is variable var1 not set. what am i doing wrong?? thanks, -C Link to comment https://forums.phpfreaks.com/topic/129398-javascript-not-passing-variables/ Share on other sites More sharing options...
rhodesa Posted October 21, 2008 Share Posted October 21, 2008 what is 'write'? that isn't javascript...are you looking for document.write? function testFunc(var1, var2) { document.write(var1); document.write(var2); } Link to comment https://forums.phpfreaks.com/topic/129398-javascript-not-passing-variables/#findComment-670835 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.