Jump to content

Problem with passing multiple variables


tmyonline

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.