I would like to second Adam's reference to Prototype, it has some
amazing capabilities packaged into a neat little framework. You can
use just the parts you need or use the entire prototype library to
accomplish the tasks that you want. As Adam noted, the library lacks
documentation but you can
Check out prototype.js. Anyopne that does AJAX should seriously check out
prototype.js its got some great functionality. Good documentation requires
you to go to google, though the script itself is fairly easy to
read/understand. The documentation I found useful was
Bryan,
qForms has this functionality:
You can do:
oForm = new qForm(frmName);
// return all form fields in the document.frmName form
structOfFields = oForm.getFields();
// return all form fields in every form object in the DOM
structOfAllFields = qFormAPI.getFields();
-Dan
-Original
: onClick grab all form elements
Bryan,
qForms has this functionality:
You can do:
oForm = new qForm(frmName);
// return all form fields in the document.frmName form
structOfFields = oForm.getFields();
// return all form fields in every form object in the DOM
structOfAllFields = qFormAPI.getFields
Thanks for that DanI'm not sure I want to get qForms in the mix if all I'd
use it for was that set of functions ;-).but good to know it's aout there.
Cheers
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax:
Bryan,
How would you loop through the struct to access key and keyvalue once
you got this, structOfAllFields = qFormAPI.getFields();?
You can loop through an associated array (aka structure) in JavaScript the
same way you do with CFSCRIPT:
for( key in structOfAllFields ){
alert(key +
Bryan,
Thanks for that DanI'm not sure I want to get qForms in the mix if all
I'd
use it for was that set of functions ;-).but good to know it's aout
there.
The point of qForms is that it's an API to ease dealing with interfacing
JavaScript and HTML forms.
There's lots of stuff qForms
Thanks Danbut wasn't my question ;-)
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
The point of qForms is that it's an API to ease dealing with interfacing
JavaScript and HTML forms.
There's lots of stuff qForms will automate for you.
-Dan
Oh I knowbut the project is underway and I only have time to learn so many
new things
I will look under the hood when time
I am not nearly good at AJAX, but I assume you would have to loop through
the form elements:
For (var strKey in objForm.elements){
Var objElement = objForm.elements[strKey];
// Check which type of element it is (NOT SURE OF SYNTAX HERE)
Switch (objElement.type){
Thanks Ben
and I see now I should have mentioned that this is not an AJAX solution I'm
after (just that AJAX is why I'd be doing this). It will most likely be a
JavaScript solution.
That would certainly workI'm just hoping there is a simpler way like in CF
where you can just use
-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 15, 2005 5:17 PM
To: CF-Talk
Subject: AJAX related: onClick grab all form elements
Hey All,
Now that I'm looking into AJAX, I'm wondering how I can grab the values of
ALL form elements
http://www.formassembly.com/index.php
~Dave the disruptor~
good sites - make money getting rid of ie :)
http://explorerdestroyer.com/
http://www.killbillsbrowser.com/
From: Bryan Stevenson [EMAIL PROTECTED]
Sent: Thursday, December 15, 2005 5:18 PM
To:
13 matches
Mail list logo