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

From: Date: Wed, 08 Dec 2004 19:29:12 +0000
Subject: Re: [QuickForm] Using JavaScript with QF generated Fields ?
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16121@lists.php.net to get a copy of this message
Hi, Justin Patrin wrote:
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.
The right approach would be of course to set the IDs manually in which case they are not autogenerated and are known to the script's author...
"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,
The correct way is using DOM method getElementById() (or maybe getElementsByName()), 'name' attribute of <form> tag is not valid XHTML.
document.forms["formName"].elements["elementName"].checked = true;


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