Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
daniel82e #1
dependent select boxes
Hello, as seen at:
[url]http://www.macromedia.com/support/dreamweaver/ts/documents/client_dynamic_listbo[/url]
x.htm
i'm using that script, the only problem, I can't find a way to make the
default selection of the CHILD'S selectedIndex
anyone has an idea how to do it ?
Daniel.
daniel82e Guest
-
Creating client-side dynamic dependent list boxes in ASP
I am trying to link two list boxes on a page using client side java. I am using Macromedia's Tech Note on this issue but still cannot get it to... -
Related Select Boxes - MX7
I have been having quiet some difficulties understanding the binding that has to be done to bind between one CFSELECT result and the bind to the... -
Cannot select graphic boxes
I cannot select graphic boxes on my document pages. I created the graphic boxes and text columns on the master pages. I set the graphic boxes to... -
A selection changes on asp page with 6 dependent list boxes, when back
Hello I have 6 dependent list boxes on my ASP page: Faculty; Lecturer; Course; Course occurrence; Group; Week commencing date.... -
Moving data between select boxes
Hi I have used ASP code to load data into two select boxes. The code below is used to move the selected data back and forth between the boxes. ... -
emo #2
Re: dependent select boxes
in the loop in populateDynaList, you'd just check to see if the value you just
used to create the new option was the default. If it is, you'd set a variable
(I used myIndex) to the current loop counter (i) and use this variable instead
of setting the selected index=0 at the end of the function. I haven't tested
it, but it would look something like this:
function populateDynaList(oList, nIndex, aArray){
myIndex=0; // initialze the variable
for (var i = 0; i < aArray.length; i= i + 3){
if (aArray == nIndex){
oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i +
2]);
if(oList.options[i+1].value == **defaultValue goes here**){
myIndex=i+1;
}
}
}
if (oList.options.length == 0){
oList.options[oList.options.length] = new Option("[none available]",0);
}
oList.selectedIndex = myIndex;
}
emo Guest



Reply With Quote

