Web Analytics Made Easy -
StatCounter cant get fisrt combo box to work... - CodingForum

Announcement

Collapse
No announcement yet.

cant get fisrt combo box to work...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cant get fisrt combo box to work...

    I cant get the first combo box to work right. why???


    Code:
    <FORM METHOD="POST" ACTION="--WEBBOT-SELF--" onsubmit="location.href='_derived/nortbots.htm';return false;" language="JavaScript" name="FrontPage_Form1" webbot-onSubmit="return FrontPage_Form1_Validator(this)">
    <!--webbot bot="SaveDatabase" -->
    <p>
    <p>
    <p>
    <br> <b> <font face="Dotum" color="#FF0000">.</font></b><font face="Arial Black" size="2" color="#FF0000">
    </font>
    
    <UL>
    <LI>
    <b>
    <font face="DotumChe">Personal ID:</font></b><TABLE id="table8">
    <TR>
    <TD ALIGN="right" width="71">
    <font face="Dotum">Name</font></TD>
    <TD>
     <!--webbot bot="Validation" s-display-name="name" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="30" --><INPUT NAME="Name" SIZE=25 maxlength="30" style="border-style: solid; border-width: 1px">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="71" height="31">
    <em style="font-style: normal; "><font face="Dotum">
    Surename</font></em></TD>
    <TD height="31">
     <!--webbot bot="Validation" s-display-name="surename" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="30" --><INPUT NAME="Surename" SIZE=25 maxlength="30" style="border-style: solid; border-width: 1px">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="71">
    <font face="Dotum"><em style="font-style: normal">Person ID</em></font></TD>
    <TD>
     <!--webbot bot="Validation" s-display-name="idcode" s-data-type="String" b-allow-digits="TRUE" b-value-required="TRUE" i-minimum-length="10" i-maximum-length="10" --><INPUT NAME="IDcode" SIZE=16 MAXLENGTH=10 style="border-style: solid; border-width: 1px">
    <font face="Dotum" size="2">ex. 8001011111</font></TD>
    </TR>
    </TABLE>
    <p> <LI><b><font face="DotumChe">Your adress:</font></b><TABLE id="table9" width="606">
    <TR>
    <TD ALIGN="right" width="64"><em style="font-style: normal; ">
    <font face="Dotum">Adress</font></em></TD>
    <TD> 
    <!--webbot bot="Validation" s-display-name="adress" s-data-type="String" b-allow-letters="TRUE" b-allow-digits="TRUE" b-allow-whitespace="TRUE" s-allow-other-chars="." b-value-required="TRUE" i-minimum-length="1" i-maximum-length="35" --><INPUT NAME="adress" SIZE=35 maxlength="35" style="border-style: solid; border-width: 1px">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="64"><font face="Dotum">City</font></TD>
    <TD> 
    <!--webbot bot="Validation" s-display-name="City" s-data-type="String" b-allow-letters="TRUE" s-allow-other-chars="`´" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="40" --><INPUT NAME="City" SIZE=35 maxlength="40" style="border-style: solid; border-width: 1px"></TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="64" height="23"><font face="Dotum">Zipcode</font></TD>
    <TD height="23"> 
    <!--webbot bot="Validation" s-display-name="Zipcode" s-data-type="String" b-allow-digits="TRUE" b-value-required="TRUE" i-minimum-length="5" i-maximum-length="5" --><INPUT NAME="Zipcode" SIZE=12 MAXLENGTH=5 style="border-style: solid; border-width: 1px">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="64" height="25"> </TD>
    
    <TD> 
    <select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
    <option>Alsace</option>
    <option>Aquitaine</option>
    <option>Auvergne</option>
    <option>Basse-Normadie</option>
    <option>Bourgogne</option>
    <option>Bretagne</option>
    <option>Centre</option>
    <option>Champange-Ardenne</option>
    <option>Franche-Comté</option>
    <option>Haute-Normandie</option>
    <option>خle-de-France</option>
    <option>Corse</option>
    <option>Languedoc-Roussillon</option>
    <option>Limousin</option>
    <option>Lorraine</option>
    <option>Midi-Pyrénées</option>
    <option>Nord-Pas-de-Calais</option>
    <option>Pays de la Loire</option>
    <option>Picardie</option>
    <option>Poitou-Charentes</option>
    <option>Provance-Alpes-Côte d´Azur</option>
    <option>Rhône-Alpes</option>
    </select>               
    <select name="Stage2" size="1">
    <option value="">Bas-Rhin -67</option>
    <option value="">Haut-Rhin -68</option>
    </select> 
    
    <script>
    <!--
    
    /*
    Double Combo Script Credit
    By JavaScript Kit ([url]www.javascriptkit.com[/url])
    Over 200+ free JavaScripts here!
    */
    
    var groups=document.FrontPage_Form1.example.options.length
    var group=new Array(groups)
    for (i=0; i<groups; i++)
    group[i]=new Array()
    
    group[0][0]=new Option("Bas-Rhin -67")
    group[0][1]=new Option("Haut-Rhin 68")
    
    group[1][0]=new Option("Dordogne - 24")
    group[1][1]=new Option("Gironde - 33")
    group[1][2]=new Option("Landes - 40")
    group[1][3]=new Option("Lot-et-Garonne -47")
    group[1][4]=new Option("Pyrénées-Atlantiques -64")
    
    group[2][0]=new Option("Allier -3")
    group[2][1]=new Option("Cantal -15")
    group[2][2]=new Option("Haute-Loire -43")
    group[2][3]=new Option("Puy-de-Dôme -63")
    
    group[3][0]=new Option("Calvados -14")
    group[3][1]=new Option("Manche -50")
    group[3][2]=new Option("Orne -61")
    
    group[4][0]=new Option("Côte-d'Or -21")
    group[4][1]=new Option("Nièvre -58")
    group[4][2]=new Option("Saône-et-Loire -71")
    group[4][3]=new Option("Yonne -89")
    
    group[5][0]=new Option("Côtes-d'Armor -22")
    group[5][1]=new Option("Finistère -29")
    group[5][2]=new Option("Ille-et-Vilaine -35")
    group[5][3]=new Option("Morbihan -56")
    
    group[6][0]=new Option("Cher -18")
    group[6][1]=new Option("Eure-et-Loir -28")
    group[6][2]=new Option("Indre -36")
    group[6][3]=new Option("Indre-et-Loir -37")
    group[6][4]=new Option("Loir-et-Cher -41")
    group[6][5]=new Option("Loiret -45")
    
    group[7][0]=new Option("Ardennes -8")
    group[7][1]=new Option("Aube -10")
    group[7][2]=new Option("haute-Marne -52")
    group[7][3]=new Option("Marne -51")
    
    group[8][0]=new Option("Doubs -25")
    group[8][1]=new Option("Haute-Saône -70")
    group[8][2]=new Option("Jura -39")
    group[8][3]=new Option("Territoire-de-Belfort -90")
    
    group[9][0]=new Option("Eure -27")
    group[9][1]=new Option("Seine-Maritime -76")
    
    group[10][0]=new Option("Essonne -91")
    group[10][1]=new Option("Haute-de-Seine -92")
    group[10][2]=new Option("Paris-75")
    group[10][3]=new Option("Seine-Saint-Denis -93")
    group[10][4]=new Option("Seine-et-Marne -77")
    group[10][5]=new Option("Val-d'Oise -95")
    group[10][6]=new Option("Val-de-Marne -94")
    group[10][7]=new Option("Yvelines -78")
    
    group[11][0]=new Option("Corse-du-Sud 2A")
    group[11][1]=new Option("Haute-Corse -2B")
    
    group[12][0]=new Option("Aude -11")
    group[12][1]=new Option("Gard -30")
    group[12][2]=new Option("Hérault -34")
    group[12][3]=new Option("Lozère -48")
    group[12][4]=new Option("Pyrénées-Orientales -66")
    
    group[13][0]=new Option("Corrèze -19")
    group[13][1]=new Option("Creuse -23")
    group[13][2]=new Option("Haute-Vienne -87")
    
    group[14][0]=new Option("Meurthe-et-moselle -54")
    group[14][1]=new Option("Meuse -55")
    group[14][2]=new Option("Moselle -57")
    group[14][3]=new Option("Vosges -88")
    
    group[15][0]=new Option("Ariège -9")
    group[15][1]=new Option("Aveyron -12")
    group[15][2]=new Option("Gers -32")
    group[15][3]=new Option("Haute-Garonne-31")
    group[15][4]=new Option("Haute-Pyrénées -65")
    group[15][5]=new Option("Lot -46")
    group[15][6]=new Option("Tarn -81")
    group[15][7]=new Option("Tarn-et-Garonne -82")
    
    group[16][0]=new Option("Nord -59")
    group[16][1]=new Option("Pas-de-Calais -62")
    
    group[17][0]=new Option("Loire-Atlantique -44")
    group[17][1]=new Option("Maine-et-Loire -49")
    group[17][2]=new Option("Maynne -53")
    group[17][3]=new Option("Sarthe -72")
    group[17][4]=new Option("Venndèe -85")
    
    group[18][0]=new Option("Aisne -2")
    group[18][1]=new Option("Oise -60")
    group[18][2]=new Option("Somme -80")
    
    group[19][0]=new Option("Charente -16")
    group[19][1]=new Option("Charente-Maritime -17")
    group[19][2]=new Option("Deux-Sèvres -79")
    group[19][3]=new Option("Vienne -86")
    
    group[20][0]=new Option("Alpes-Maritimes -6")
    group[20][1]=new Option("Aples-de-Haute-Provance -4")
    group[20][2]=new Option("Bouches-de-Rhône -13")
    group[20][3]=new Option("Haute-Alpes -5")
    group[20][4]=new Option("Vaucluse -84")
    
    group[21][0]=new Option("Ain -1")
    group[21][1]=new Option("Ardèche -7")
    group[21][2]=new Option("Drôme -26")
    group[21][3]=new Option("Haute-Savoie -74")
    group[21][4]=new Option("Isère -38")
    group[21][5]=new Option("Loire -42")
    group[21][6]=new Option("Rhône -69")
    group[21][7]=new Option("Savoie-73")
    
    
    
    
    var temp=document.FrontPage_Form1.Stage2
    
    function redirect(x){
    for (m=temp.options.length-1;m>0;m--)
    temp.options[m]=null
    for (i=0;i<group[x].length;i++){
    temp.options[i]=new Option(group[x][i].text,group[x][i].value)
    }
    temp.options[0].selected=true
    }
    
    function go(){
    location=temp.options[temp.selectedIndex].value
    }
    //-->
    </script>
    
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="64"><font face="Dotum">Phone</font></TD>
    <TD> 
    <!--webbot bot="Validation" s-display-name="Phone" s-data-type="String" b-allow-digits="TRUE" i-maximum-length="25" --><INPUT NAME="Phone" SIZE=25 MAXLENGTH=25 style="border-style: solid; border-width: 1px">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="64"><font face="Dotum">E-Mail</font></TD>
    <TD> 
    <!--webbot bot="Validation" s-data-type="String" b-allow-letters="TRUE" b-allow-digits="TRUE" s-allow-other-chars=". @" --><INPUT NAME="Email" SIZE=25 style="border-style: solid; border-width: 1px">
    </TD>
    </TR>
    </TABLE>
    <p> <LI><b><font face="DotumChe">Your <u>NEW ADRESS:</u></font></b><TABLE id="table11" height="31" width="348">
    <TR>
    <TD ALIGN="right" width="84"><font face="Dotum">From date</font></TD>
    <TD> <input name="date" size="17" maxlength="10" value="Date" style="border-style: solid; border-width: 1px">
    <a href="java script:show_calendar('FrontPage_Form1.date', FrontPage_Form1.date.Date);">
    <img src="cal.gif" width="16" height="16" border="0" alt="Click Here to Choose a Date"></a>
    Click to set date</TD>
    </TR>
    </TABLE>
    <TABLE width="604" id="table10" height="156">
    <TR>
    <TD ALIGN="right" width="62" height="25"><font face="Dotum">Adress</font></TD>
    <TD height="25"> 
    <!--webbot bot="Validation" s-display-name="newadress" s-data-type="String" b-allow-letters="TRUE" b-allow-digits="TRUE" b-allow-whitespace="TRUE" s-allow-other-chars="." b-value-required="TRUE" i-minimum-length="1" i-maximum-length="50" --><INPUT NAME="newadress" SIZE=35 maxlength="50" style="border-style: solid; border-width: 1px">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="62"><font face="Dotum">City</font></TD>
    <TD> 
    <!--webbot bot="Validation" s-display-name="newcity" s-data-type="String" b-allow-letters="TRUE" s-allow-other-chars="`´" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="50" --><INPUT NAME="newcity" SIZE=35 maxlength="50" style="border-style: solid; border-width: 1px"></TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="62"><font face="Dotum">Zipcode</font></TD>
    <TD> 
    <!--webbot bot="Validation" s-display-name="newzip" s-data-type="String" b-allow-digits="TRUE" b-value-required="TRUE" i-minimum-length="5" i-maximum-length="5" --><INPUT NAME="newzip" SIZE=12 MAXLENGTH=5 style="border-style: solid; border-width: 1px">
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right">Region</TD>
    <TD>  
    <select name="example0" size="1" onChange="redirect(this.options.selectedIndex)">
    <option>Alsace</option>
    <option>Aquitaine</option>
    <option>Auvergne</option>
    <option>Basse-Normadie</option>
    <option>Bourgogne</option>
    <option>Bretagne</option>
    <option>Centre</option>
    <option>Champange-Ardenne</option>
    <option>Franche-Comté</option>
    <option>Haute-Normandie</option>
    <option>خle-de-France</option>
    <option>Corse</option>
    <option>Languedoc-Roussillon</option>
    <option>Limousin</option>
    <option>Lorraine</option>
    <option>Midi-Pyrénées</option>
    <option>Nord-Pas-de-Calais</option>
    <option>Pays de la Loire</option>
    <option>Picardie</option>
    <option>Poitou-Charentes</option>
    <option>Provance-Alpes-Côte d´Azur</option>
    <option>Rhône-Alpes</option>
    </select>               
    <select name="stage3" size="1">
    <option value="">Bas-Rhin -67</option>
    <option value="">Haut-Rhin -68</option>
    </select> 
    
    <script>
    <!--
    
    /*
    Double Combo Script Credit
    By JavaScript Kit ([url]www.javascriptkit.com[/url])
    Over 200+ free JavaScripts here!
    */
    
    var groups=document.FrontPage_Form1.example0.options.length
    var group=new Array(groups)
    for (i=0; i<groups; i++)
    group[i]=new Array()
    
    group[0][0]=new Option("Bas-Rhin -67")
    group[0][1]=new Option("Haut-Rhin 68")
    
    group[1][0]=new Option("Dordogne - 24")
    group[1][1]=new Option("Gironde - 33")
    group[1][2]=new Option("Landes - 40")
    group[1][3]=new Option("Lot-et-Garonne -47")
    group[1][4]=new Option("Pyrénées-Atlantiques -64")
    
    group[2][0]=new Option("Allier -3")
    group[2][1]=new Option("Cantal -15")
    group[2][2]=new Option("Haute-Loire -43")
    group[2][3]=new Option("Puy-de-Dôme -63")
    
    group[3][0]=new Option("Calvados -14")
    group[3][1]=new Option("Manche -50")
    group[3][2]=new Option("Orne -61")
    
    group[4][0]=new Option("Côte-d'Or -21")
    group[4][1]=new Option("Nièvre -58")
    group[4][2]=new Option("Saône-et-Loire -71")
    group[4][3]=new Option("Yonne -89")
    
    group[5][0]=new Option("Côtes-d'Armor -22")
    group[5][1]=new Option("Finistère -29")
    group[5][2]=new Option("Ille-et-Vilaine -35")
    group[5][3]=new Option("Morbihan -56")
    
    group[6][0]=new Option("Cher -18")
    group[6][1]=new Option("Eure-et-Loir -28")
    group[6][2]=new Option("Indre -36")
    group[6][3]=new Option("Indre-et-Loir -37")
    group[6][4]=new Option("Loir-et-Cher -41")
    group[6][5]=new Option("Loiret -45")
    
    group[7][0]=new Option("Ardennes -8")
    group[7][1]=new Option("Aube -10")
    group[7][2]=new Option("haute-Marne -52")
    group[7][3]=new Option("Marne -51")
    
    group[8][0]=new Option("Doubs -25")
    group[8][1]=new Option("Haute-Saône -70")
    group[8][2]=new Option("Jura -39")
    group[8][3]=new Option("Territoire-de-Belfort -90")
    
    group[9][0]=new Option("Eure -27")
    group[9][1]=new Option("Seine-Maritime -76")
    
    group[10][0]=new Option("Essonne -91")
    group[10][1]=new Option("Haute-de-Seine -92")
    group[10][2]=new Option("Paris-75")
    group[10][3]=new Option("Seine-Saint-Denis -93")
    group[10][4]=new Option("Seine-et-Marne -77")
    group[10][5]=new Option("Val-d'Oise -95")
    group[10][6]=new Option("Val-de-Marne -94")
    group[10][7]=new Option("Yvelines -78")
    
    group[11][0]=new Option("Corse-du-Sud 2A")
    group[11][1]=new Option("Haute-Corse -2B")
    
    group[12][0]=new Option("Aude -11")
    group[12][1]=new Option("Gard -30")
    group[12][2]=new Option("Hérault -34")
    group[12][3]=new Option("Lozère -48")
    group[12][4]=new Option("Pyrénées-Orientales -66")
    
    group[13][0]=new Option("Corrèze -19")
    group[13][1]=new Option("Creuse -23")
    group[13][2]=new Option("Haute-Vienne -87")
    
    group[14][0]=new Option("Meurthe-et-moselle -54")
    group[14][1]=new Option("Meuse -55")
    group[14][2]=new Option("Moselle -57")
    group[14][3]=new Option("Vosges -88")
    
    group[15][0]=new Option("Ariège -9")
    group[15][1]=new Option("Aveyron -12")
    group[15][2]=new Option("Gers -32")
    group[15][3]=new Option("Haute-Garonne-31")
    group[15][4]=new Option("Haute-Pyrénées -65")
    group[15][5]=new Option("Lot -46")
    group[15][6]=new Option("Tarn -81")
    group[15][7]=new Option("Tarn-et-Garonne -82")
    
    group[16][0]=new Option("Nord -59")
    group[16][1]=new Option("Pas-de-Calais -62")
    
    group[17][0]=new Option("Loire-Atlantique -44")
    group[17][1]=new Option("Maine-et-Loire -49")
    group[17][2]=new Option("Maynne -53")
    group[17][3]=new Option("Sarthe -72")
    group[17][4]=new Option("Venndèe -85")
    
    group[18][0]=new Option("Aisne -2")
    group[18][1]=new Option("Oise -60")
    group[18][2]=new Option("Somme -80")
    
    group[19][0]=new Option("Charente -16")
    group[19][1]=new Option("Charente-Maritime -17")
    group[19][2]=new Option("Deux-Sèvres -79")
    group[19][3]=new Option("Vienne -86")
    
    group[20][0]=new Option("Alpes-Maritimes -6")
    group[20][1]=new Option("Aples-de-Haute-Provance -4")
    group[20][2]=new Option("Bouches-de-Rhône -13")
    group[20][3]=new Option("Haute-Alpes -5")
    group[20][4]=new Option("Vaucluse -84")
    
    group[21][0]=new Option("Ain -1")
    group[21][1]=new Option("Ardèche -7")
    group[21][2]=new Option("Drôme -26")
    group[21][3]=new Option("Haute-Savoie -74")
    group[21][4]=new Option("Isère -38")
    group[21][5]=new Option("Loire -42")
    group[21][6]=new Option("Rhône -69")
    group[21][7]=new Option("Savoie-73")
    
    
    
    
    var temp=document.FrontPage_Form1.stage3
    
    function redirect(x){
    for (m=temp.options.length-1;m>0;m--)
    temp.options[m]=null
    for (i=0;i<group[x].length;i++){
    temp.options[i]=new Option(group[x][i].text,group[x][i].value)
    }
    temp.options[0].selected=true
    }
    
    function go(){
    location=temp.options[temp.selectedIndex].value
    }
    //-->
    </script>
    
    
    
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="62" height="23"><font face="Dotum">Phone</font></TD>
    <TD height="23"> 
    <!--webbot bot="Validation" s-display-name="newphone" s-data-type="String" b-allow-digits="TRUE" i-maximum-length="15" --><INPUT NAME="newphone" SIZE=25 MAXLENGTH=15 style="border-style: solid; border-width: 1px">  
    </TD>
    </TR>
    <TR>
    <TD ALIGN="right" width="62" height="23"><font face="Dotum">E-Mail</font></TD>
    <TD height="23"> 
    <!--webbot bot="Validation" s-data-type="String" b-allow-letters="TRUE" b-allow-digits="TRUE" s-allow-other-chars=". @" --><INPUT NAME="NewEmail" SIZE=25 style="border-style: solid; border-width: 1px"></TD>
    </TR>
    </TABLE>
    <p> </UL>   
    <INPUT TYPE="submit" VALUE=" SUBMIT " style="font-family: DotumChe">
    <INPUT TYPE=reset VALUE="CLEAR FORM" style="font-family: DotumChe">
    </FORM>
    Last edited by Mr Barcode; Feb 29, 2004, 01:01 PM.

  • #2
    PLEASE!!!!!!

    SOMEONE......

    Comment


    • #3
      well holy crap! u posted the code twice...
      ?


      digicam

      Comment


      • #4
        Originally posted by digicam
        well holy crap! u posted the code twice...
        Without bothering to even use [code]CODE HERE[/code] tags!

        Mr Barcode;

        Noone is going to try to read several hundred lines of code when it is presented like that. Try going back and edit your post and use the [code]CODE HERE[/code] tags!

        Also, if you are trying to use two instances of the same script. At the very least, you will need to change the variable names.

        .....Willy

        Comment


        • #5
          ok, the code is posted right.

          Comment


          • #6
            Im not sure how to change the Variable name in the script, anyone???

            Comment


            • #7
              So you need to use a double-combo script twice on the same page? Is that the question?
              Check out the Forum Search. It's the short path to getting great results from this forum.

              Comment


              • #8
                Yes Roy, two combo twice on the same page....u think can help me

                Comment


                • #9
                  You need to make it object-oriented to make multiple instances of this script. And it would take a major change to do that. I haven't seen an OO Double Combo script anywhere. Maybe someone with knowledge and time can do that.

                  I think that javascript authors should start to write OO scripts (for multiple instance functionality) especially if the scripts are intended to be submitted in Javascript sites like dynamicdrive or javascriptkit.

                  beetle is on that track, though an OO Double Combo script is not yet available. beetle, got time?
                  Last edited by glenngv; Mar 2, 2004, 02:43 AM.
                  Glenn
                  vBulletin Mods That Rock!

                  Comment

                  Working...
                  X