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
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - H�bergement Group.
www.WorldAKT.com - H�bergement de sites Internet
"�Ystein H�Land" <[EMAIL PROTECTED]> a �crit dans le message de news:
[EMAIL PROTECTED]
> 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
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php