W
Window Frog
Hello all. Admitedly I am not a Javascript guy. Several months ago
someone helped me put together a a script which up unitl now worked
just fine. Now, I did not change anything and yet it no longer works.
The code is as follows:
*******************************************************************************************
function populate(val){
var itemArray = new Array()
<%
dim iNo
iNo = 0
While Not rsMod.EOF
Response.Write "itemArray[" & iNo & "] = {value: '" & rsMod("vName")
& "',category: '" & rsMod("vCat") & "',modcat: '" & rsMod("vNo") &
"'}" & vbNewLine
iNo = iNo + 1
rsMod.MoveNext
WEND
%>
document.form.selectMod.options.length = 0;
var amount = 0;
for(i=0;i<itemArray.length;i++){
if(itemArray.category == val){
eval("document.form.selectMod.options[amount]=" + "new Option('" +
itemArray.value + "','" + itemArray.modcat + "')")
amount = amount+1
}
}//for loop one closer
}//function closer
******************************************************************************************************
Essentially, there is a drop down that when selected populates another
drop down based on the first selection. The vbscript above is pulling
values from my database. Again, this has all worked just fine and now
does not. But I have not changed anything. Any thoughts? Thank you.
someone helped me put together a a script which up unitl now worked
just fine. Now, I did not change anything and yet it no longer works.
The code is as follows:
*******************************************************************************************
function populate(val){
var itemArray = new Array()
<%
dim iNo
iNo = 0
While Not rsMod.EOF
Response.Write "itemArray[" & iNo & "] = {value: '" & rsMod("vName")
& "',category: '" & rsMod("vCat") & "',modcat: '" & rsMod("vNo") &
"'}" & vbNewLine
iNo = iNo + 1
rsMod.MoveNext
WEND
%>
document.form.selectMod.options.length = 0;
var amount = 0;
for(i=0;i<itemArray.length;i++){
if(itemArray.category == val){
eval("document.form.selectMod.options[amount]=" + "new Option('" +
itemArray.value + "','" + itemArray.modcat + "')")
amount = amount+1
}
}//for loop one closer
}//function closer
******************************************************************************************************
Essentially, there is a drop down that when selected populates another
drop down based on the first selection. The vbscript above is pulling
values from my database. Again, this has all worked just fine and now
does not. But I have not changed anything. Any thoughts? Thank you.