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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Melbourne, Australia
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quad Combo script

    I have been looking at JKD's Quad Combo script from sometime back. Has anybody developed this script to target frames? I have been using the triple combo successfully and would like to do the same with quad code.

    Thanx

    David

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Er, this is going to sound weird, but I don't actually know where that script is... it has to be many years old by now. If you post a link to it, I can show you where to make the edit.

  • #3
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Melbourne, Australia
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanx for the reply - here is the code. Hope the memories come flooding back because it is great functionality.

    Cheers

    David

    <html>
    <head>
    <title>ComboBox[4]</title>
    </head>
    <body>

    <FORM name="CBN">
    <table border="0" cellspacing="0" cellpadding="0" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9">
    <tr align="center">
    <td nowrap height="11"> &nbsp;
    <select name="CBN1" size="1" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9"
    onChange="ReDirect1(this.options.selectedIndex)">
    <option selected>---Select1-------------</option>
    <option>1</option>
    <option>2</option>
    </select>
    <select name="CBN2" size="1" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9"
    onChange="ReDirect2(this.options.selectedIndex)">
    <option value=" " selected> </option>
    <option value=" " selected>---Select2--------------</option>
    <option value=" " selected>---Select2--------------</option>
    </select>
    <select name="CBN3" size="1" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9"
    onChange="ReDirect3(this.options.selectedIndex)">
    <option value=" " selected> </option>
    <option value=" " selected>---Select3----------------</option>
    <option value=" " selected>---Select3----------------</option>
    </select>
    <select name="CBN4" size="1" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9"
    onChange="ReDirect(this.options.selectedIndex)">
    <option value=" " selected> </option>
    <option value=" " selected>---Select4----------------</option>
    <option value=" " selected>---Select4----------------</option>
    </select>
    <script>
    <!--

    /* */
    var temp=document.CBN.CBN2
    var temp1=document.CBN.CBN3
    var temp2=document.CBN.CBN4
    var CB2=document.CBN.CBN1.options.length
    var CB3=document.CBN.CBN2.options.length
    var CB4=document.CBN.CBN3.options.length
    var ComboBox2=new Array(CB2)
    var ComboBox3=new Array(CB2)
    var ComboBox4=new Array(CB2)

    var maximum="12"
    var max=eval(maximum-1)
    /* */

    for (a=0; a<=max; a++){
    ComboBox2[a]=new Array()
    }
    for (b=0; b<=max; b++){
    ComboBox3[b]=new Array()
    for (c=0; c<=max; c++){
    ComboBox3[b][c]=new Array()
    }}
    for (d=0; d<=max; d++){
    ComboBox4[d]=new Array()
    for (e=0; e<=max; e++){
    ComboBox4[d][e]=new Array()
    for (f=0;f<=max; f++){
    ComboBox4[d][e][f]=new Array()
    }}}

    ComboBox2[0][0]=new Option("---Select2---"," ");
    ComboBox2[1][0]=new Option("Now Select This One"," ");
    ComboBox2[1][1]=new Option("1.1","");
    ComboBox2[1][2]=new Option("1.2","");
    ComboBox2[2][0]=new Option("Now Select This One"," ");
    ComboBox2[2][1]=new Option("2.1","");
    ComboBox2[2][2]=new Option("2.2","");
    ComboBox3[0][0][0]=new Option("---Select 3---"," ");
    ComboBox3[1][0][0]=new Option("---Select 3---"," ");
    ComboBox3[1][1][0]=new Option("Now Select This One"," ");
    ComboBox3[1][1][1]=new Option("1.1.1","");
    ComboBox3[1][1][2]=new Option("1.1.2","");
    ComboBox3[1][2][0]=new Option("Now Select This One"," ");
    ComboBox3[1][2][1]=new Option("1.2.1","");
    ComboBox3[1][2][2]=new Option("1.2.2","");
    ComboBox3[2][0][0]=new Option("---Select 3---"," ");
    ComboBox3[2][1][0]=new Option("Now Select This One"," ");
    ComboBox3[2][1][1]=new Option("2.1.1","");
    ComboBox3[2][1][2]=new Option("2.1.2","");
    ComboBox3[2][2][0]=new Option("Now Select This One"," ");
    ComboBox3[2][2][1]=new Option("2.2.1","");
    ComboBox3[2][2][2]=new Option("2.2.2","");
    ComboBox4[0][0][0][0]=new Option("---Select 4---"," ");
    ComboBox4[1][0][0][0]=new Option("---Select 4---"," ");
    ComboBox4[1][1][1][0]=new Option("Now Select A Page"," ");
    ComboBox4[1][1][1][1]=new Option("1.1.1.1","http://www..com");
    ComboBox4[1][1][1][2]=new Option("1.1.1.2","http://www..com");
    ComboBox4[1][1][2][0]=new Option("Now Select A Page"," ");
    ComboBox4[1][1][2][1]=new Option("1.1.2.1","http://www..com");
    ComboBox4[1][1][2][2]=new Option("1.1.2.2","http://www..com");
    ComboBox4[1][2][1][0]=new Option("Now Select A Page"," ");
    ComboBox4[1][2][1][1]=new Option("1.2.1.1","http://www..com");
    ComboBox4[1][2][1][2]=new Option("1.2.1.2","http://www..com");
    ComboBox4[1][2][2][0]=new Option("Now Select A Page"," ");
    ComboBox4[1][2][2][1]=new Option("1.2.2.1","http://www..com");
    ComboBox4[1][2][2][2]=new Option("1.2.2.2","http://www..com");
    ComboBox4[2][0][0][0]=new Option("---Select 4---"," ");
    ComboBox4[2][1][1][0]=new Option("Now Select A Page"," ");
    ComboBox4[2][1][1][1]=new Option("2.1.1.1","http://www..com");
    ComboBox4[2][1][1][2]=new Option("2.1.1.2","http://www..com");
    ComboBox4[2][1][2][0]=new Option("Now Select A Page"," ");
    ComboBox4[2][1][2][1]=new Option("2.1.2.1","http://www..com");
    ComboBox4[2][1][2][2]=new Option("2.1.2.2","http://www..com");
    ComboBox4[2][2][1][0]=new Option("Now Select A Page"," ");
    ComboBox4[2][2][1][1]=new Option("2.2.1.1","http://www..com");
    ComboBox4[2][2][1][2]=new Option("2.2.1.2","http://www..com");
    ComboBox4[2][2][2][0]=new Option("Now Select A Page"," ");
    ComboBox4[2][2][2][1]=new Option("2.2.2.1","http://www..com");
    ComboBox4[2][2][2][2]=new Option("2.2.2.2","http://www..com");


    /* */
    function ReDirect1(x){
    for (m=temp.options.length-1;m>0;m--)
    temp.options[m]=null
    for (i=0;i<ComboBox2[x].length;i++){
    temp.options[i]=new Option(ComboBox2[x][i].text,ComboBox2[x][i].value)
    }
    temp.options[0].selected=true
    ReDirect2(0)
    }
    function ReDirect2(y){
    var x=document.CBN.CBN1.options.selectedIndex
    for (m=temp1.options.length-1;m>0;m--)
    temp1.options[m]=null
    for (i=0;i<ComboBox3[x][y].length;i++){
    temp1.options[i]=new Option(ComboBox3[x][y][i].text,ComboBox3[x][y][i].value)
    }
    temp1.options[0].selected=true
    ReDirect3(0)
    }
    function ReDirect3(z){
    var x=document.CBN.CBN1.options.selectedIndex
    var y=document.CBN.CBN2.options.selectedIndex
    for (m=temp2.options.length-1;m>0;m--)
    temp2.options[m]=null
    for (i=0;i<ComboBox4[x][y][z].length;i++){
    temp2.options[i]=new Option(ComboBox4[x][y][z][i].text,ComboBox4[x][y][z][i].value)
    }
    temp2.options[0].selected=true
    }
    function ReDirect(z){
    window.location=temp2[z].value
    }
    //-->
    </script>

    </td>
    </tr>
    </table>
    </FORM>

    <p>
    <br>
    <font face="arial" size="-2">Thanks to Hamid Cheheltani and Jason Karl Davis of &nbsp; <a href="http://wsabstract.com">Website Abstraction</a> &nbsp; for providing this free script
    </font>
    </p>

    </body>
    </html>

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Egh, I wish I knew then what I know now. Oh well, the change you need to make is here:
    Code:
    function ReDirect(z){
    window.location=temp2[z].value
    }
    Replace window.location with top.frames[X].location.href where X is the offset of the frame you are targetting. You also may be able to use the frame name in quotes for X as well.

  • #5
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Melbourne, Australia
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    May be a little old but doing a fine job. Frame mod works a treat

    Thanx

    David

  • #6
    New Coder
    Join Date
    Dec 2008
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts
    jkd,

    I want to modify this 4 combo select so that in some cases, if only 3 inputs are required, after the 3rd input is made, a seperate window is immediately opened without any requirement for the user to make a 4th (unneeded) selection.

    Please tell me, where and how do i need to modify the Quadruple Select code shown above soas to make that possible?

    Thanks!
    dframeli


  •  

    Posting Permissions

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