STOPPED WORKING

Discussion in 'Javascript' started by Window Frog, Apr 24, 2007.

  1. Window Frog

    Window Frog Guest

    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.
     
    Window Frog, Apr 24, 2007
    #1
    1. Advertising

  2. Window Frog

    Lee Guest

    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.


    --
     
    Lee, Apr 24, 2007
    #2
    1. Advertising

  3. Window Frog

    dave Guest

    On Apr 24, 10:31 am, Window Frog <> wrote:
    > 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?
     
    dave, Apr 26, 2007
    #3
  4. Window Frog

    Window Frog Guest

    On Apr 25, 7:45 pm, dave <> wrote:
    > On Apr 24, 10:31 am, Window Frog <> wrote:
    >
    >
    >
    > > 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.
     
    Window Frog, May 2, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marina

    All validators stopped working

    Marina, Jun 27, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    456
    Rajesh Tiwari
    Jun 27, 2003
  2. S. Justin Gengo
    Replies:
    0
    Views:
    369
    S. Justin Gengo
    Jul 24, 2003
  3. Mark E

    ASP.NET pages stopped working

    Mark E, Jul 24, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    437
    Mark E
    Jul 24, 2003
  4. Stephan Bour

    Response-Redirect stopped working

    Stephan Bour, May 5, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    380
    Stephan Bour
    May 5, 2004
  5. Frank
    Replies:
    1
    Views:
    364
    Frank
    Jun 16, 2004
Loading...

Share This Page