I'm using both qForms and prototype.js for form validation and AJAX support back to a CF application.  I'd concur that AJAX is a great way to solve the related selects, especially when the first box has a lot of records, and the second has a few related to the first (e.g. software names in the first box, and specific versions in the second).  In this case, having all the data on the page first and controlling what elements are in the second select box is faster during operation, but it is slower to get the page sent to the browser.  Generally speaking, anything that goes back to the web server after page load will feel a little bit slower than having all the data on the page in the first place.
 
That being said, I've run into a namespace issue with qForms and prototype - both of them attempt to define a "Field" object and the definitions collide.  Of the two, I believe I made a change to the prototype object, renaming it PrototypeField.  I think there were only a couple places that needed to be changed in order to get the two to stop conflicting with each other.
 
-matt
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Aaron Rouse
Sent: Friday, October 06, 2006 15:54
To: [email protected]
Subject: Re: [CFCDEV] TwoSelectsRelated

I'll third it, when using small to medium sized data sets which I am assuming is being used here since the old TwoSelectsRelated is being used, I have found the AJAX solutions to actually be a little bit slower than the JS.  It would be quite simple to integrate qForms or something along those lines into this.  You might even be able ot just use qForms with the existing custom tag then just use the setValue() functions in qForms.

On 10/5/06, Matt Williams <[EMAIL PROTECTED]> wrote:
I second the use of qForms for something like this. Even if working on
an existing app, adding qForms take minimal effort. You use a combo of
CF/_javascript_ to create _javascript_ objects that hold the select box
options. Then, to preselect a value, it would look something like:
objForm.MainSelect.setValue("#MainSelectValue");
objForm.RelatedSelect.setValue("RelatedSelectValue");

Matt


On 10/5/06, Dan Vega <[EMAIL PROTECTED] > wrote:
> Thanks for everyone's help. This was an existing application that I was just
> trying to make some updates to. I think I need to take some time and just
> write the related selects using an Ajax solution.
>

--
Aaron Rouse
http://www.happyhacker.com/
You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to