html-select

Selecting Multiple Options creates Multiple Inputs

I have a select field in a form that allows you to select multiple options. I need to create a new input textbox for every number of options selected, automatically. For example, if you select on option in the select box, one input will appear below it. If you select 5, 5 inputs will appear below it. I'm not sure if this can be done ...

Disable or ignore mousedown on select field in firefox

Is there any way to make it so a click on a select input field does not open the list of options? I tried returning false from onmousedown and onclick, I tried calling this.blur() in onfocus, I tried setting the readonly attribute, none of this seems to work in Firefox. Chrome and IE seem to take the "return false" in the mousedown hand...

jQuery triggers in a form

I previous recieved help with a problem, getting a multiple option select form to create new inputs, depending on how many were selected. The code below is what ended up working for me (credit goes to Peter Bailey) <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html lang="en"> <head> <titl...

jquery plugin for dropdown from select or list

I need a lightweight jquery plugin to build up a dropdown. I need this to work with both a source <select> or <ul>, this could be one or two separate plugins. The dropdown displayed needs to display the contents in multiple columns - I've only seen one plugin do this (http://www.givainc.com/labs/mcdropdown_jquery_plugin.htm) which is a g...

PHP - Pass Drop Down List option through query string

I have a drop down list that has options that need to be passed through a query string. How would I go about doing this? Also, would anyone be able to list a way to do this both using a button and without using a button? Thank you! ...

Not able to pass value from a select list in a simple crud form?

Hi, I have written a simple CRUD form which has one select list. However the value from the select list doesnot seem to get passed to the database. it get passed when I am using a simple text box. What is the possible error? Please point out <?php include('config.php'); if (isset($_POST['submitted'])) { foreach($_POST AS $key => $value...

Adding options to SELECT tag via JS ..Are not styled by CSS?

I have a select tag that looks like this: <select style="background:#fa7171; color:#FFFFFF;" name="product_type_sub" id="product_type_sub" onChange="ajaxFunction(1);"> <option value="None Selected">None Selected</option> </select> You can see the inline css sayin the font should be white, and it is at first. but I add/remove more ...

html select tag problem

enter code herei am using the folllowing code . I wnat that the only single option is selected. but right now its showing some other options as selected by defaul when the page loads. How can i make one particular of my choice o selected? <select name="ms"> ...

how can we remove an item from SELECT list whose SIZE is not declared

How can we remove a selected item from SELECT whose SIZE is not declared, means acting as drop down list. using javascript ...

Changing URL through html select

What is the best way to change your URL through an html select? <select> <option selected="selected">Change to URL X</option> <option>Change to URL Y</option> </select> What Javascript should be used? ...

Using Selenium for selecting an option on a select with optgroup

Hi, I'm trying to select a value in a select element. I'm using Selenium RC (Java) to run the test cases. I understand that the code for selecting a value is given by: selenium.select("locator", "value=REQUIRED VALUE") I'm unable to select the desired value with the above code. I think it might be something to do with optgroup in the...

Jquery - issue with click event on Select dropdowin in IE6

Hi, I am having an issue with a jquery function. It works in FF but not in IE 6. I want the function to be triggered when any option inside a select drop down is clicked. Here is the start of my funcation: $('#titleSelect option').click( function() { alert("title clicked"); ...... }); Here is my drop down list: <selec...

multiple select values error

I have a form that allows the user to select up to X amount of options from a multi-select field. If the user selects an item greater than the X items it prompts and de-selects the last selected item. There is an issue when the warning message has been thrown by a previous multi-select. The form have 4 mult-selects, so if its thro...

Why is my HTML Select box in Opera Browser not behaving?

I have a simple select element on my page: <select id="info_routes" size="10"></select> This select box gets populated at page load via jquery at document ready: for (var route in _routes) { var val = _routes[route].id; var key = 'route_'+val; $("<option />").attr({id: key, value: val}).appendTo('#info_routes'); $('#info_...

some jQuery/javascript help. Add items to optgroup

I have an array called tmp var tmp = ["05", "13", "27"]; if an option value is equal to a value within tmp, I want to add that option to a particular optgroup, else add it to the other optgroup. I keep getting everything added to optgroup #2, except the option with the value "27". What am I doing incorrectly? var groups = $("opt...

creating a select element via js, focus doesn't work in IE

Hi there! I'm a newbie in js and I'm afraid that i haven't the knowledge to resolve the next issue. If I have a select element ( populated with several options ) already parsed by the browser on the load, the next code works just fine in both IE and FF $('selectId').focus(); but if I create ( and populate it ) the element via js va...

Change HTML-select element value with mousewheel in Firefox

Hi there, Is there any possibility to tell Firefox to use the mousewheel für scrolling through the select element. In firefox after selecting another value the select element looeses its focus, and in IE it doest loose its focus, so if i use my wheel the onchange event is fired. Try here. Is there any solution? Thank you ...

Select element: Short and Long names without javascript?

Is there a non-javascript method to allow a <select> element to show short display text when collapsed and longer text when expanded? I came across the "label" attribute for <option> but it is only supported in IE7+. Example: The expanded menu would display: Philosophy 101 Religious Studies 202 Intro to Meditation 303 Mind and its Po...

Zend Framework - Set 'selected' value in select box dropdown list

I am adding a select element to a Zend_Form instance as follows: $user = $form->createElement('select','user')->setLabel('User: ')->setRequired(true); foreach($users as $u) { if($selected == $u->id) { $user->addMultiOption($u->id,$u->firstname.' '.$u->lastname); //*** some way of setting a selected opt...

Sliding & hiding multiple panels in jQuery.

I have a table with multiple rows in each row is a select list and based on the selection (when the onchange event is fired) panels appear containing additional data below the row.I currently have code like this: var allPnls = '.inv-dtl-comnts-add,.inv-dtl-comnts-update'; $(document).ready(function(){ hideAll(); //select a...