Re: form and java ?
| From: | _lallous | Date: | Mon, 05 Nov 2001 12:15:36 +0000 |
| Subject: | Re: form and java ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73466@lists.php.net to get a copy of this message | ||
<script>
function validate()
{
var f = document.f1;
retval = true;
if (f.Option4.checked && f.Option1.checked)
{
alert('you already blah blah blah...');
retval = false;
}
return retval;
}
</script>
<form name="f1" onsubmit="return validate();">
your checkboxes data goes here
</form>
"Teqila Man" <teqilaman@poczta.wp.pl> wrote in message
news:005901c164a9$16d20dc0$0ec063d9@tm...
> <input type=checkbox name="Option1" value="440||014" ">
> <input type=checkbox name="Option2" value="340||015" ">
> <input type=checkbox name="Option3" value="240||016" ">
> <input type=checkbox name="Option4 that also includes product of code 014"
> value="440||000" >
>
> I have the form (look at top) and i send values....normaly i had this code
> (440||014 ... 1st value is prize and second code)
>
> while (list ($name, $value, $kod_prod) = each($HTTP_POST_VARS))
> {
> $wartosc = explode("||", $value);
> print("$name");
> print("<br>[$wartosc[0] dolars ");
> print("code :$wartosc[1] ]");
> }
>
> But now i want to make that if someone checks the "Option4 that also
include
> s product of code 014" and Option1 ... the form will say sorry you have
choo
> sen 014 already by choosing Option4.........
>
>
> The javascript without sending the form.... someone knows the solution...
>
> Big thanks even for reading this :)
>
>
> TEqilaman
>