Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    w3x
    w3x is offline
    New to the CF scene
    Join Date
    Dec 2003
    Location
    USA
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multipe Forms On One Page...

    I am doing modifications to my website. One of the things I am doing is attempting to change my links page so it will be more organized that it is at this moment. I am trying to drop down boxes which shows a short description of the selected item. My problem is that I had so many links that I decide to break them down into six different catagories with six different drop down boxes in six different forms. At this point I have only have two forms on the page (the second is incomplete) but the second is not working right now. My problem is two-fold so far:

    1. The second drop down box is reading the links from the first form and jumping to those links when the go button is pressed.

    2. The descriptions of the selected links in the second form will not show. It's as if it is not seeing any of the code.

    Can someone help me get this to work. I'm going to post what I have on the site right now so anyone who wants to help me can see it. I will be doing updates so refreshing the screen often might reveal changes I've made.

    http://www.36chambers.org then click on the 'Lynx' button in the left frame.

    My flag football site.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    The reason for this is because you have only referenced the first option list in the script

  • #3
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Please try the following



    <HTML>
    <HEAD>
    <TITLE>Document Title</TITLE>

    <SCRIPT language="JavaScript">
    <!--

    textdisplay0=new Array()
    textdisplay0[0]="36 Chamber's Flag Football Eteamz Site"
    textdisplay0[1]="2002 8-Man National Champions "
    textdisplay0[2]="5-Time MAFFA Champs"

    textdisplay1=new Array()
    textdisplay1[0]="1"
    textdisplay1[1]="2"
    textdisplay1[2]="3"
    textdisplay1[3]="4"
    textdisplay1[4]="5"
    textdisplay1[5]="6"
    textdisplay1[6]="7"
    textdisplay1[7]="8"
    textdisplay1[8]="9"
    textdisplay1[9]="10"
    textdisplay1[10]="11"
    textdisplay1[11]="12"
    textdisplay1[12]="13"
    textdisplay1[13]="14"

    textdisplay2=new Array()
    textdisplay2[0]="d"
    textdisplay2[1]="e"
    textdisplay2[2]="f"

    textdisplay3=new Array()
    textdisplay3[0]="g"
    textdisplay3[1]="h"
    textdisplay3[2]="i"

    textdisplay4=new Array()
    textdisplay4[0]="j"
    textdisplay4[1]="k"
    textdisplay4[2]="l"

    textdisplay5=new Array()
    textdisplay5[0]="m"
    textdisplay5[1]="n"
    textdisplay5[2]="o"

    function init(){
    for(i=0;i<6;i++){
    document.getElementById("display"+i).innerHTML=window["textdisplay"+i][0]
    }
    }

    function jumptolink(loc){
    window.open(loc,'','width=600,height=400,left=50,top=50') // new window
    }

    // -->
    </SCRIPT>

    <style>
    .txt{font:italic 13px Arial}
    select{background-color:#FFFFD7}
    </style>
    </HEAD>
    <BODY onload="init()">
    <FORM name="my_form">

    <table border="2" cellpadding="2" cellspacing="2" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="160">
    <tr>
    <td width="25%" align="center" height="120">
    <!-- ************************************************************-->
    <h3><u><font color="blue">Teams</font></u></h3>

    <SELECT name="menu0" onChange="document.getElementById('display0').innerHTML=textdisplay0[this.form.menu0.selectedIndex]">
    <option value="http://www.eteamz.com/36chambers">36 Chambers</option>
    <option value="http://www.eteamz.com/pfuzion/">Pfuzion</option>
    <option value="http://www.eteamz.com/FPWOLFPAC/">Wolfpac</option>
    </SELECT>
    <input type="button" value="Go" onClick="jumptolink(this.form.menu0.options[this.form.menu0.selectedIndex].value)"><br>
    <div id="display0" class="txt">Display</div>
    </td>
    <td width="25%" align="center" height="120">
    <SELECT name="menu1" onChange="document.getElementById('display1').innerHTML=textdisplay1[this.form.menu1.selectedIndex]">
    <option selected value="http://www.amaftfl.com">AMAFTFL</option>
    <option value="http://www.eteamz.com/maffa/">MAFFA</option>
    <option value="http://www.aftfl.com/home.cfm">AFTFL</option>
    <option value="http://www.pro-flagfootball.com/">Pro Flag Football</option>
    <option value="http://www.usftl.com/">USFTL</option>
    <option value="http://topgunflagfootball.com/news.htm?source=google">Top Gun</option>
    <option value="http://www.afafootball.com/">AFA Football</option>
    <option value="http://www.usclubsport.com/pages/FrameNAFFA.html">NAFFA</option>
    <option value="http://www.tzffl.com/home.cfm">TZFFL</option>
    <option value="http://www.ucffl.com/">UCFFL</option>
    <option value="http://www.wafff.com/">WAFFF</option>
    <option value="http://keywest.com/nwffa3.html">NWFFA</option>
    <option value="http://www.womensfootballcentral.com/">NWFA</option>
    <option value="http://www.eteamz.com/SouthernFootballLeague/">SFL</option>
    </SELECT>
    <input type="button" value="Go" onClick="jumptolink(this.form.menu1.options[this.form.menu1.selectedIndex].value)"><br>
    <div id="display1" class="txt">Display</div>
    </td>
    <td width="25%" align="center" height="120">
    <SELECT name="menu2" onChange="document.getElementById('display2').innerHTML=textdisplay2[this.form.menu2.selectedIndex]">
    <option value="">A menu</option>
    <option value="">B menu</option>
    <option value="">C menu</option>
    </SELECT>
    <input type="button" value="Go" onClick="jumptolink(this.form.menu2.options[this.form.menu2.selectedIndex].value)"><br>
    <div id="display2" class="txt">Display</div>
    </td>
    <tr>
    <td width="25%" align="center" height="120">
    <SELECT name="menu3" onChange="document.getElementById('display3').innerHTML=textdisplay3[this.form.menu3.selectedIndex]">
    <option value="">A menu</option>
    <option value="">B menu</option>
    <option value="">C menu</option>
    </SELECT>
    <input type="button" value="Go" onClick="jumptolink(this.form.menu3.options[this.form.menu3.selectedIndex].value)"><br>
    <div id="display3" class="txt">Display</div>
    </td>
    <td width="25%" align="center" height="120">
    <SELECT name="menu4" onChange="document.getElementById('display4').innerHTML=textdisplay4[this.form.menu4.selectedIndex]">
    <option value="">A menu</option>
    <option value="">B menu</option>
    <option value="">C menu</option>
    </SELECT>
    <input type="button" value="Go" onClick="jumptolink(this.form.menu4.options[this.form.menu4.selectedIndex].value)"><br>
    <div id="display4" class="txt">Display</div>
    </td>
    <td width="25%" align="center" height="120">
    <SELECT name="menu5" onChange="document.getElementById('display5').innerHTML=textdisplay5[this.form.menu5.selectedIndex]">
    <option value="">A menu</option>
    <option value="">B menu</option>
    <option value="">C menu</option>
    </SELECT>
    <input type="button" value="Go" onClick="jumptolink(this.form.menu5.options[this.form.menu5.selectedIndex].value)"><br>
    <div id="display5" class="txt">Display</div>
    </td>
    </tr>
    </table>

    </form>
    </BODY>
    </HTML>





  •  

    Posting Permissions

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