Re: submit() buttons don't work

From: Date: Mon, 17 Jul 2000 11:39:38 +0000
Subject: Re: submit() buttons don't work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6908@lists.php.net to get a copy of this message
Just a few debugging suggestions. 1) make sure you put all variable info in quotes "but1" "but2" etc. 2) change submit method from post to get, this way you can see in the actual URL that the data is making it to you form. I think this will make you problem self evident, at least it should. Hope this helps David Newcomb wrote: > 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> -- Strider Centaur HTTP://www.Scifi-Fantasy.com " It is my observation that unless you really understand the issues, you are hardly in a position to criticize. Nearly all Linux users have used Windows, but very few Windows users have used Linux. " -- Me

« previous php.general (#6908) next »