P
Pasquale
I am attempting to populate a few select drop down menus from the
selection of the first drop down. I am using ajax to submit data via a
PHP GET and from the response populate the other drop down menus.
I figured out how to get it to do so for more than one drop down, but I
am getting the following error below. This was working fine until I
tried to populate more than one other drop down menu. Any idea why the
SELECT object isn't being passed? It seems so close.
Thanks,
Pasquale
*** begin error ***
missing ] after element list
GetInfo([object HTMLSelectElement],1,"Color") Line 82
-----------------|
*** end error ***
*** begin JavaScript snip ***
var attr;
var attrarray = new Array (
'Color','Type'
);
function InfoLoop (sel,selset) {
for (var i = 0; i < attrarray.length; i++) {
attr = attrarray;
setTimeout('GetInfo('+sel+','+selset+',"'+attr+'")',2000); //Line 82
}
}
*** end JavaScript snip ***
*** begin HTML snip ***
<SELECT id="Collection_1" name="Collection_1" size="1"
onChange="InfoLoop(this,1)">
*** end HTML snip ***
selection of the first drop down. I am using ajax to submit data via a
PHP GET and from the response populate the other drop down menus.
I figured out how to get it to do so for more than one drop down, but I
am getting the following error below. This was working fine until I
tried to populate more than one other drop down menu. Any idea why the
SELECT object isn't being passed? It seems so close.
Thanks,
Pasquale
*** begin error ***
missing ] after element list
GetInfo([object HTMLSelectElement],1,"Color") Line 82
-----------------|
*** end error ***
*** begin JavaScript snip ***
var attr;
var attrarray = new Array (
'Color','Type'
);
function InfoLoop (sel,selset) {
for (var i = 0; i < attrarray.length; i++) {
attr = attrarray;
setTimeout('GetInfo('+sel+','+selset+',"'+attr+'")',2000); //Line 82
}
}
*** end JavaScript snip ***
*** begin HTML snip ***
<SELECT id="Collection_1" name="Collection_1" size="1"
onChange="InfoLoop(this,1)">
*** end HTML snip ***