Results 1 to 3 of 3

Thread: This code is broken

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    Hi,I went to Serge's new site before it went down and he gave me this code, but my machine tells me it wants a ";" on line 5? All things look right to me and I have no problem running other Javascripts.Anyone know?
    code;

    <HTML>
    <HEAD>
    <META name=VI60_defaultClientScript content=VBScript>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <Script LANGUAGE=JavaScript>
    Function Redirect()
    {
    var strURL;

    strURL = cboMyDropdown.options(cboMyDropdown.selectedIndex).innerText;
    location.href = "MyOtherPage.asp?cboMyDropdown=" & strURL;
    }


    </Script>
    </HEAD>
    <BODY>
    <P>
    <SELECT name="cboMyDropdown" id="cboMyDropdown" size="1">
    <OPTION Value="Index1">Value1</OPTION>
    <OPTION Value="Index2">Value2</OPTION>
    <OPTION Value="Index3">Value3</OPTION>
    <OPTION Value="Index4">Value4</OPTION>
    </SELECT>
    </P>
    <INPUT type=Button value=Submit id=submit1 name=submit1 OnClick="Redirect()">
    </BODY>
    </HTML>



    Second Page (MyOtherPage.asp)

    'Request object will have the value of the selected item in the dropdown
    Response.Write Request("cboMyDropDown")

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    "Function" should be "function"

    javacsript is case sensitive
    Mark
    -------------------

  3. #3
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355
    dont u just hate that?? c++, jscript, etc are all case senstive and it's really annoying cos u keep having to press shift
    buzzwords are the language of fools

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width