P
Pascal Ehlert
Hi group!
I was trying to build a JS solution for related select lists (child
lists gets populated depending on the value selected in parent list),
which uses no Ajax and is still "usable" in an environment with JS
disabled. 
I have done this with the Low Pro framework which basically
just registers event handlers on certain elements chosen by CSS
selectors.
This is the result: 
http://pastie.caboo.se/136818
The initialize function first sets this.child to the next child element
(css classes "related" and "child") it can find, then parses it's
options (I have used option groups there which are still meaningful
without JS) and saves it to this.grouped_options. 
Now as soon as the
parent value changes it populates the child list from the stored
options.
That not only sounds nice but also works, with one major drawback..

The reason for my post. It works fine in Firefox and Safari but it
doesn't work at all in Internet Explorer 6 or 7.
It just stops, gives some IE typical error messages with non-existing
line numbers etc. and doesn't even remove the old options from the
child list.
Here is a live example: 
http://odatest.hacksrus,net/sandbox.html
I hope someone can help me out and since I'm still a newbie to JS, I'd
also appreciate all other tips concerning the code.
By the way.. I've even heard that it works sometimes, it's really weird..
Regards
Pascal
I was trying to build a JS solution for related select lists (child
lists gets populated depending on the value selected in parent list),
which uses no Ajax and is still "usable" in an environment with JS
disabled. 
I have done this with the Low Pro framework which basically
just registers event handlers on certain elements chosen by CSS
selectors.
This is the result: 
http://pastie.caboo.se/136818
The initialize function first sets this.child to the next child element
(css classes "related" and "child") it can find, then parses it's
options (I have used option groups there which are still meaningful
without JS) and saves it to this.grouped_options. 
Now as soon as the
parent value changes it populates the child list from the stored
options.
That not only sounds nice but also works, with one major drawback..

The reason for my post. It works fine in Firefox and Safari but it
doesn't work at all in Internet Explorer 6 or 7.
It just stops, gives some IE typical error messages with non-existing
line numbers etc. and doesn't even remove the old options from the
child list.
Here is a live example: 
http://odatest.hacksrus,net/sandbox.html
I hope someone can help me out and since I'm still a newbie to JS, I'd
also appreciate all other tips concerning the code.
By the way.. I've even heard that it works sometimes, it's really weird..
Regards
Pascal