Jump to content

Help with DropDown Box


Aijaz

Recommended Posts

Looks like a text field problem:

 

It will look something like this as it is:

<input type="text" name="dropme" value="myvalue">

Needs to look something like this:

<select>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select>

Reference: http://www.w3schools.com/tags/tag_select.asp

Link to comment
Share on other sites

if you want to pull a value out of the drop down using PHP then you need this:

<select name="automaker">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select>

This would give the web page graceful degradation in my opinion with people disabling JavaScript.

 

Link to comment
Share on other sites

Your Country dropdown has this onchange event

onchange="javascript:getDivContent('/ch_div_content.php?method=getPriceSets&countryId='+this.value,'divPriceSet','');return true;" 

On selecting a country from the menu it will pass in the selected options value to ch_div_content.php.

 

This script appears to be controlling the quantity field. For example selecting any country between Israel and United Kingdom from the country menu and a static quantity field is returned. However selecting any other country a dropdown box is returned.

Link to comment
Share on other sites

Show us the form code + Javascript for the onchange function and where you are compiling the drop box and what ever is needed from ch_div_content.php that handles method=getPriceSets&countryId='+this.value.

 

Don't show any passwords / usernames or any secure data.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.