On Sunday 01 September 2002 02:52, Øystein Håland wrote: > 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> > <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
Looks like a javascript question to me. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The opulence of the front office door varies inversely with the fundamental solvency of the firm. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php