Announcement

Collapse
No announcement yet.

V7 site: Best automatic submit drop down - 2 options.

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

    V7 site: Best automatic submit drop down - 2 options.

    Hi

    I have two options to use to allow me to use drop down lists with automatic select... I have tested both on various systems/browers and one seems to be better ... version 2. I just thought I would get the opinions of the forum as to the best one to use...

    Option 1

    <td>
    <SELECT NAME=GroupID onChange=this.form.submit();
    STYLE='height:10px;width:90;'>
    <OPTION VALUE="Any">Choose page</OPTION>
    <OPTION VALUE="http://www.kjbeckett.com/acatalog/leatherwallets.html">J. Fold</OPTION>
    <OPTION VALUE="http://www.kjbeckett.com/acatalog/leatherwallets_p2.html">Ted Baker</OPTION>
    <OPTION VALUE="http://www.kjbeckett.com/acatalog/leatherwallets_p3.html">Simon Carter</OPTION>
    <OPTION VALUE="http://www.kjbeckett.com/acatalog/leatherwallets_p4.html">Stewart/Stand</OPTION>
    <OPTION VALUE="http://www.kjbeckett.com/acatalog/leatherwallets_p5.html">Billabong</OPTION>
    <OPTION VALUE="http://www.kjbeckett.com/acatalog/leatherwallets_p6.html">Ducti</OPTION>
    <OPTION VALUE="http://www.kjbeckett.com/acatalog/leatherwallets_p7.html">db clay</OPTION>
    </SELECT>
    </TD>
    Option 2 (the version I intend to use at present)

    <form action="#" method="get" name="getthis" >
    <div align="center">
    <select name="list" onChange="location=document.forms['getthis'].elements[0].value";style='height:10px;width:90;'>
    <option selected="selected">Choose brand</option>
    <option value = "http://www.kjbeckett.com/acatalog/leatherwallets.html">J. Fold</option>
    <option value = "http://www.kjbeckett.com/acatalog/leatherwallets_p2.html">Ted Baker</option>
    <option value = "http://www.kjbeckett.com/acatalog/leatherwallets_p3.html">Simon Carter</option>
    <option value = "http://www.kjbeckett.com/acatalog/leatherwallets_p4.html">Stewart/Stand</option>

    <option value = "http://www.kjbeckett.com/acatalog/leatherwallets_p6.html">Ducti</option>
    <option value = "http://www.kjbeckett.com/acatalog/leatherwallets_p7.html">db clay</option>
    </select>
    </div>
    </form>
    Any opinions appreaciated.

    Paul
    KJ Beckett
    Men's Clothing & Accessories
    Cufflinks, Underwear, Ties, Grooming Products
    Bath, England
    Fast delivery to UK, USA and worldwide.
    Men's Fashion Blog

    #2
    Hi

    Using Option 2 I am finding an errors on SOME (not all) browsers I test on ... the dropdown under the prev/next buttons on the top right of the page ...http://www.kjbeckett.com/acatalog/le...allets_p2.html

    Can anyone suggest where I might go to innvestigate the error I found on an IE browser (I think it is IE7)?

    Line: 42
    Char: 1
    Error: 'document.forms.getthis.elements.0' is null or not an object
    Code: 0
    URL: http://www.kjbeckett.com/acatalog/leatherwallets.html
    I think it might occur when I select the page on list that I am currently on. But then the dropdown refuses to work on any other page.

    Any advice appreciated.

    Paul
    KJ Beckett
    Men's Clothing & Accessories
    Cufflinks, Underwear, Ties, Grooming Products
    Bath, England
    Fast delivery to UK, USA and worldwide.
    Men's Fashion Blog

    Comment


      #3
      I didn't work on any page for me in IE7. It didi work in FF but I couldn't see the selections as the selector bax was too narrow to see the text.

      Sorry I don't know why though...

      Comment


        #4
        Hi Thanks

        There must be something wrong in this bit code the code, the rest looks fine...

        <form action="#" method="get" name="getthis" >
        <div align="center">
        <select name="list" onChange="location=document.forms['getthis'].elements[0].value";style='height:10px;width:90;'>
        Would it be that the above code conflicts with something already on the page?

        Paul
        KJ Beckett
        Men's Clothing & Accessories
        Cufflinks, Underwear, Ties, Grooming Products
        Bath, England
        Fast delivery to UK, USA and worldwide.
        Men's Fashion Blog

        Comment


          #5
          I think this might be resolved...

          I think I need to replace...

          <select name="list" onChange="location=document.forms['getthis'].elements[0].value";style='height:10px;width:90;'>
          with...

          <select name="list" onchange="if(!this.value.indexOf('http')){location=this.value;}" style="height:10px;width:90px;">
          (and change the height).

          Paul
          KJ Beckett
          Men's Clothing & Accessories
          Cufflinks, Underwear, Ties, Grooming Products
          Bath, England
          Fast delivery to UK, USA and worldwide.
          Men's Fashion Blog

          Comment

          Working...
          X