submit() buttons don't work
| From: | David Newcomb | Date: | Mon, 17 Jul 2000 11:11:31 +0000 |
| Subject: | submit() buttons don't work | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6906@lists.php.net to get a copy of this message | ||
Hi,
I am having trouble with javascript submit() no transferring the value of the
button.
Dose anyone know if it is a problem with PHP or the client browsers,
and what can I do about it?
Should I report it as a bug?
Here is an example.
<html><body>
<form name=myform method=post action="<?php echo $PHP_SELF; ?>">
<input type=hidden name=formed value=ok><br>
<input type=text name=txtbox size=10 value=""><br>
<input type=button name=but1 value="type is button"
onclick="submit()"><br>
<input type=submit name=but2 value="type is submit"><br>
</form>
<?php
if ($formed == "ok")
{
echo "txtbox=$txtbox<br>\n";
echo "but1=$but1<br>\n";
echo "but2=$but2<br>\n";
}
?>
</body></html>