0

Why isn't this working????

Echo '
<form action="show.php" method="post" onChange="this.form.submit()">
<select>
<option value selected>select</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
</form> ';
6
Contributors
8
Replies
10
Views
8 Years
Discussion Span
Last Post by Yipyo
0

if the form has any form field named 'submit' than just rename it to 'submit2' or anything else than 'submit'. run the code.

If it still doesn't works provide more detail about the code.

okay, i agree upon the previous reply.

0

change ur code with this........
it will work .......

echo '
<form action="show.php" method="post" onChange="this.submit()">
<select>
<option value selected>select</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
<input type="submit" value="submit">
</form> ';
0

change ur code with this........
it will work .......

echo '
<form action="show.php" method="post" onChange="this.submit()">
<select>
<option value selected>select</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
<input type="submit" value="submit">
</form> ';

Replace your Double Quotes by Single Quotes, and vice versa.

echo "<form action='show.php' method='post' onChange='this.submit()'><select><option value selected>select</option><option value='1'>1</option><option value='2'>2</option></select><input type='submit' value='submit'></form> ";

Regards...

0

Replace your Double Quotes by Single Quotes, and vice versa.

echo "<form action='show.php' method='post' onChange='this.submit()'><select><option value selected>select</option><option value='1'>1</option><option value='2'>2</option></select><input type='submit' value='submit'></form> ";

Regards...

why....that is not necessary.

0

Sorry .... onChange="this.submit();" goes in the SELECT tag

i was referring to replacing of the double quotes with single quotes. i was just wondering why you would do that. I really doesn't make much of a difference.

0

Thank you. My problem was the onchange was in the option not the select. Every other site neglects to mention that.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.