Hi Folks,
I´d like to submit a form automatically, without using the onload() function, it should be done within the code.
There´s a form, which will be shown,if an option is true.
The form will show a select with onchange.
but if theres no option, the form should be automaticly submitted
sample:
It doesn´t work. I couldn´t use <meta http-equiv="refresh" content="0; URL=URI"> cause it´s in the middle of code, and some browsers make errors. Even I have to put several "hidden" vars.
BTW This is inside php-code so the vars start with $.
Any Ideas?
TIA Oliver
I´d like to submit a form automatically, without using the onload() function, it should be done within the code.
There´s a form, which will be shown,if an option is true.
The form will show a select with onchange.
but if theres no option, the form should be automaticly submitted
sample:
Code:
<form action="test_dr.php3" method="post">
<input type="hidden" name="scar" value="'.$scar.'">
// ... some more "hiddens"
if(something)
{
<select onchange="form.action='test_dr.php3'; form.submit();" name="cmodell">
<option>....
</select>
// works fine
}
else
{
<input type="hidden" name="cmodell" value="$scar">
<script type="text/javascript"> form.action='test_dr.php3'; form.submit();
</script>
}
</form>
BTW This is inside php-code so the vars start with $.
Any Ideas?
TIA Oliver