STOPPED WORKING

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.
 
L

Lee

Window Frog said:
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:
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.

What does "does not" work mean?
Do you see error messages? Unexpected results?
Show us the code that appears in the web page, without the vbscript.


--
 
D

dave

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.


Computers are amazingly resilient. they keep doing things over and
over again with 100% accuracy. Something changed. Perhaps data?
 
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.

Computers are amazingly resilient. they keep doing things over and
over again with 100% accuracy. Something changed. Perhaps data?


My apologies, I have been on vacation and did not get this response. I
completely agree and would not have posted had I not been thoroughly
stumped by it. To my knowledge I in no way changed the page. The data
has remained consistent as well. I am completely willing to use a
different solution for the script and not just a fix for the current
one. Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top