Since no one's replied, I've thought of a few specific questions
related to the code.

On 2/7/06, Kevin Old <[EMAIL PROTECTED]> wrote:
> function setMake() {
>     var make = document.getElementById("make");
>     var makere = /ford/;
>
>     // Set the make
>     for (var i=make.options.length-1; i>=0; i--) {
>             var m = make.options[i].value;
>             if ( makere.test(m) ) {
>                 make.selectedIndex = i;
>                 var modelAjax = new Ajax.Updater({ success: 'model'},
> '/util/model_select_response', { parameters: 'make='+m,
> onComplete:setModel } );
>             }
>     }
> }
>

Is there a more elegant way to parse down through the options of a
select list and set the value?  I've seen several functions in the
documentation like indexOf() and it seems like I could just use that,
but I get a message saying that "indexOf is not a method" when trying
to use it.

The reason I added the Updater in setMake() and other functions was
that the EventObserver wasn't executing when the window.onload code
executed and set the correct value of make.  I assume since the
Updater and EventObserver were clashing, that there must be some way
for me to force an event?  If so, can someone point me to how I'd do
that?

Any help is appreciated!
Kevin
--
Kevin Old
[EMAIL PROTECTED]
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to