Results 1 to 3 of 3

Thread: script for combo box

  1. #1
    Join Date
    May 2007
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default script for combo box

    i used a combo box with go bottom (put our products in that combo box so the others should select one of them and press on go bottom to link to related page)

    i used bellow code. would you please help me to use this combo box without go bottom?

    use this style in head tag:
    <style>
    .jc{
    position:relative;
    }

    .comboStyle { border-style:groove; border-width:3; font-family: Tahoma; font-size: 12; background-color: #FFFFFF}
    .hLight00 { background-color: #F3F8FE}
    .hLight01 { background-color: #FFF9F9}

    </style>



    and use this form combo box:
    <form>
    <p dir="rtl" style="margin-left: 5; margin-right: 5; margin-top:10px; margin-bottom:2px" class="matnPar_fa">
    <select size="1" name="cmbItemSelect" dir="ltr" class="comboStyle" style="font-size: 11">
    <option selected value="0">[
    product ]</option>
    <option value="page link 1">
    product 1
    </option>
    <option value="page link 2">
    product 2
    </option>

    </select></p>
    <p align="center" dir="rtl" style="margin-left: 5; margin-right: 5; margin-top:5px; margin-bottom:2px" class="matnPar_fa">
    <span style="font-weight: 400">
    <input type="button" value="جستجو " name="btmSubmit" style="font-family: Tahoma; font-size: 10px" onclick="if(cmbItemSelect.value!='0'){window.location.href=cmbItemSelect.value;} return false;"></span></p>
    </form>

  2. #2
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    Code:
    <form>
    <p dir="rtl" style="margin-left: 5; margin-right: 5; margin-top:10px; margin-bottom:2px" class="matnPar_fa">
    <select size="1" name="cmbItemSelect" dir="ltr" class="comboStyle" style="font-size: 11">
    <option selected value="0">[
    product ]</option>
    <option value="page link 1">
    product 1
    </option>
    <option value="page link 2">
    product 2
    </option>
    
    </select></p>
    <p align="center" dir="rtl" style="margin-left: 5; margin-right: 5; margin-top:5px; margin-bottom:2px" class="matnPar_fa">
    <span style="font-weight: 400">
    <input type="button" value="جستجو " name="btmSubmit" style="font-family: Tahoma; font-size: 10px" onclick="if(cmbItemSelect.value!='0'){window.location.href=cmbItemSelect.value;} return false;"></span></p>
    </form>
    I think you can just do this

    Code:
    <select size="1" name="cmbItemSelect" dir="ltr" class="comboStyle"
    onchange="if(this.value!='0'){window.location.href=this.value;}
    style="font-size: 11">
    <option selected value="0">[
    product ]</option>
    <option value="page link 1">
    product 1
    </option>
    <option value="page link 2">
    product 2
    </option>
    </select>

  3. #3
    Join Date
    May 2007
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thankyou

    Thanks for your great help. it is work correctly.

Bookmarks

Posting Permissions

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