www.webdeveloper.com
Results 1 to 2 of 2

Thread: Variables dropping out in netscape7

  1. #1
    Join Date
    Dec 2006
    Posts
    1

    Variables dropping out in netscape7

    I have a javascript that combines two pull down lists to give a URL. It works in mozilla and firefox, but not netscape 7. Any ideas?

    <script type='text/javaScript'>
    site = 'http://www.aps4.anl.gov/operations/ops_source/beamline_usage';
    function combineMenus(frm, run, beamline) {
    with (frm) {
    str1 = run.options[run.selectedIndex].value;
    str2 = beamline.options[beamline.selectedIndex].value;
    url = site + '/' + str1 + '/' + 'UserDownTime_' + str2 + '.html';


    window.location.href = url;
    }
    }</script><head><body><form name=menufrm><b>Run: <select NAME="run">
    <option selected>
    <option> 2006-Run1</option>
    <option> 2006-Run2</option>
    </select><b>Beamline: <select NAME="beamline">
    <option selected>

    <option> 1-BM-C </option>
    <option> 1-ID-B </option>
    <option> 1-ID-C </option>
    <option> 2-BM-B </option>
    <option> 2-ID-B </option>
    <option> 2-ID-D </option>
    </select><input type=button value='Select' onClick='combineMenus(this.form, this.form.run, this.form.beamline)'>

    I run it from a perl script to populate the two option fields.

    Thanks for your help.

  2. #2
    Join Date
    Aug 2006
    Location
    England
    Posts
    665
    Quote Originally Posted by randrew24
    <select NAME="run">
    <option selected>
    <option> 2006-Run1</option>
    <option> 2006-Run2</option>
    </select><b>Beamline: <select NAME="beamline">
    <option selected>

    <option> 1-BM-C </option>
    <option> 1-ID-B </option>
    <option> 1-ID-C </option>
    <option> 2-BM-B </option>
    <option> 2-ID-B </option>
    <option> 2-ID-D </option>
    </select>
    If you refer to the value property of an option, it's advisable to assign something to it beforehand, or the result can be unpredictable. Sometimes the value of text property is copied to value, sometimes not.
    Scripterlative.com

    PM = 'PayPal Mode'

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles