Re: [QuickForm] Using JavaScript with QF generated Fields ?

From: Date: Wed, 08 Dec 2004 18:00:34 +0000
Subject: Re: [QuickForm] Using JavaScript with QF generated Fields ?
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16117@lists.php.net to get a copy of this message
On Wed, 08 Dec 2004 13:16:25 +0300, Alexey Borzov <borz_off@cs.msu.su> wrote: > Hi, > > Mirco Blitz wrote: > > I want to write some JavaScripts that handle checkboxes inside my Site. > > (Something like if box x is checked, box a-h are checked as well) > > Did you see the word "javascript" in the name of this mailing list? No? > That's because there isn't one! No need to have been so harsh...you could have just responded to his implied question. That would be: "Are the ids set randomly? Is there any way to know what they're going to be?" This *does* have to do with QF as the ids are set by QF. > > > Now I get the error when I check the AllCheckboxes box I get the following > > error by IE. > > > "The object does not support that action" > > > > I can't figure out if that is because of an error in the Jscript or some > > Problem according to QF. You may want to use the "correct" way of accessing the form. First of all, give the form a name if you haven't already. Second, document.forms["formName"].elements["elementName"].checked = true; You also may be able to get the ids from QF somehow, but I have no idea how. For all of my QF related JS I use the above syntax as it relies on the name of the element and not the ID. (Then again, for my own forms I tend to use getElementById, but...) > > Yes, *of course* QF is responsible for all errors in the javascript > *you* write. > > > > > Thank you for helping me. > > No problem. > > P.S. Do not respond to the existing threads, start new threads if you > want to ask a new question. > -- Justin Patrin

« previous php.pear.general (#16117) next »