tmyonline Posted March 25, 2009 Share Posted March 25, 2009 Hi guys, I have the following HTML: <select onchange="display(value);"> <option value="A">A</option> <option value="B">B</option> ... </select> The above display() works fine if I pass in one variable "value". However, when I need to pass in another variable, say a flag, it fails to work. For example, if I do: onchange="display(value, 'month')" it never works. I check the source code and I don't see any problem with my syntax. I don't get it. Any ideas ? Thanks. Link to comment https://forums.phpfreaks.com/topic/151107-problem-with-passing-multiple-variables/ Share on other sites More sharing options...
Maq Posted March 25, 2009 Share Posted March 25, 2009 What do you mean it doesn't work? What exactly happens? Remove the single quotes around 'month' unless you literally mean month. Link to comment https://forums.phpfreaks.com/topic/151107-problem-with-passing-multiple-variables/#findComment-793810 Share on other sites More sharing options...
lonewolf217 Posted March 25, 2009 Share Posted March 25, 2009 I dont suppose you forgot to change your function to accept 2 variables when you tried to change the function call to send 2 variables. Firefox has a built in error console that catches a lot of javascript errors and has been quite helpful in debugging some of my own issues Link to comment https://forums.phpfreaks.com/topic/151107-problem-with-passing-multiple-variables/#findComment-793900 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.