PHP button
| From: | Brent Clark | Date: | Mon, 26 Apr 2004 11:30:46 +0000 |
| Subject: | PHP button | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-184617@lists.php.net to get a copy of this message | ||
Hi all
I have been for some time trying to get this right
I need to diable a button, which I can do with javascript, all works fine
until the submit \ posting part .
this is my part of my code below:
This is my form section:
---------------------------
<form action="scanbatch.php" method="POST" name="frm" >
This is my php code, if the conditions are met:
-----------------------------------------------
echo "<input type=\"button\" name=\"read\" value=\"Next\"
onclick=\"dob();\">";
This is my javascript:
-----------------------
<script language="javascript">
<!--
function dob(){
document.frm.read.disabled=true;
document.frm.submit();
}
//->
</script>
The button does disable the button like it should
the problem is that, apart from the disabling of the button, the does not
update my database.
In fact it does nothing
BUT
if I change the "type" from "button" to "submit" in the <input>
tag.
Then it works
I cant find away for this to work. (Co exist)
Could someone please help
I feel the problem defiantly lies with PHP
Kind Regards and thanks in advance
Brent Clark