Re: Using checkbox in php problem
| From: | Killer Angel Clark | Date: | Sat, 23 Feb 2002 15:15:56 +0000 |
| Subject: | Re: Using checkbox in php problem | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17221@lists.php.net to get a copy of this message | ||
Oh!!
That is my careless mistake!
I would uncheck the box when the box is checked for example.
That solution cannot work on the javascript.
"Bogdan Stancescu" <mgv@fx.ro> ¼¶¼g©ó¶l¥ó news:3C7791C9.4070806@fx.ro...
> This is only part of the solution, but you should be aware that "==" is
> a comparison operator whereas "=" is the assignment operator.
>
> Bogdan
>
> Killer Angel Clark wrote:
>
> >I add a checkbox in my page and will use the check result on another
page.
> >If it is checked, it has no problem. However, if it is not checked, it
will
> >have the checkbox unknown error.
> >I read from an article that I can add a hidden field with the same name
of
> >the checkbox and put a value on this hidden field. It is OK on php. But
it
> >is not OK with the JavaScript.
> >In the JavaScript, I check this:
> > if(document.name.checkbox1.checked == true){
> > document.name.checkbox1.checked == false;
> > }
> > document.name.checkbox1.checked == false;
> >But it cannot find out whether the box is checked or not. And the last
line
> >cannot uncheck the box neither.
> >How to change the code will make it OK in both php and JavaScript?
> >Thanks!!
> >
> >
> >
>
>
>