- Jun 29, 2002
- 922
- 0
- 76
I am writing a drop down menu in php, and I want to pass the updated selected option as a variable into another function in blah.php. But I haven't found a way to get it to work yet. Does anyone see anything wrong?
Originally posted by: kamper
What's this function in blah.php called? It's not returnTest() is it?
The first thing that I see wrong is the syntax for your onchange event. I assume you're trying to use the value of the php variable $testFile to pass to a javascript function called returnTest(). You'll probably want to quote the value in javascript and add an echo to the php part because all you're doing is making a statement that doesn't do anything by stating a variable name. Or is <?php= $testFile ?> valid syntax?
Originally posted by: kamper
What's this function in blah.php called? It's not returnTest() is it?
The first thing that I see wrong is the syntax for your onchange event. I assume you're trying to use the value of the php variable $testFile to pass to a javascript function called returnTest(). You'll probably want to quote the value in javascript and add an echo to the php part because all you're doing is making a statement that doesn't do anything by stating a variable name. Or is <?php= $testFile ?> valid syntax?
