Re: posting form values doesn't work

From: Date: Sun, 01 Sep 2002 00:12:10 +0000
Subject: Re: posting form values doesn't work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114799@lists.php.net to get a copy of this message
This is not Javascript or HTML's newsgroup. You should read some docs about PHP/HTML before doing that, you're currently using Javascript for nothing. -- Merci de nous avoir choisi. - Thanks you for your choice. Nicos - CHAILLAN Nicolas nicos@worldakt.com nicos@php.net www.GroupAKT.com - Hébergement Group. www.WorldAKT.com - Hébergement de sites Internet "ØYstein HåLand" <ha@ematte.se> a écrit dans le message de news: 20020831185441.4600.qmail@pb1.pair.com... > This is my form: > <FORM NAME="answerform" METHOD=POST> > Your name:<BR><INPUT TYPE=TEXT NAME="name" SIZE=20> > Group:<BR><INPUT TYPE=TEXT NAME="group" SIZE=8>&nbsp;&nbsp; > <INPUT TYPE=BUTTON VALUE=" OK!" > onClick="Javascript:validate(this);"> > </FORM> > > and the function validate: > function validate() { > var ok=true; > if (document.answerform.name.value=='') { > ok=false; > alert('Please write Your name') > document.answerform.name.focus(); > document.answerform.name.select(); > } > if (document.answerform.group.value=='') { > ok=false; > alert('What group?') > document.answerform.group.focus(); > document.answerform.group.select(); > } > if (ok==true) { > location.href='groups/collect_answer.php?name=<?php echo $name; > ?>&group=<?php echo $group; ?>'; > return true; > } else { return false; } > } > > and this doesn't work and I can't see why not > >

« previous php.general (#114799) next »