html-select

Problems re-populating select options in Rails when form returned with errors

I have a form with 2 select options in it -- frequency and duration. When there are errors with the form, and it is returned to the browser, the select options are not re-populated with the selections the user made even though the returned values for those fields match the values of options in the selects. Also, when the form is returned...

Fire event each time a DropDownList item is selected with jQuery

I have a dropdown: <asp:DropDownList id="dropdownid" runat="server" class=blah"/> in my jQuery, I assign change event like this: $('#dropdownid').change(function() {......}); Now, this works when I select different value from the dropdown, however let's say I want to select the same value again. (because I want to make another call w...

Maximum clickable options #IE8

There seem to be a limitation in the maximum number of clickable options in a select element. If there is a select element with 3200+ options. Items from 3125 to N doesn't fire change event when they are clicked. However, items can be selected with the keyboard. Any idea if this is a bug or a feature of IE8?. There is no such problem i...

Help with html select replacement

I hate default select control, that's because it can't be styled in IE using CSS. This is why I developed a new select control from scratch, using HTML + CSS + JavaScript. I did a great job in the past two days matching CSS and HTML together, but today I discovered a bug wich looks very hard for me to fix. In IE 7, when I have tow contr...

HTML DOM: How to call a SELECT box's update method?

Hey, I'm writing a VB application that interacts with the HTML DOM. If I go to this page: https://edit.yahoo.com/registration And then try to change the "I prefer content from" SELECT box in the top right to "Yahoo! Asia" from the default option selected, I can do so using this command: Document.Forms.regFormBody.preferredcontent.se...

[jQuery] Execute script based on which option is selected in a select box?

I've got a select box where the user selects which elements they want to see based on option 1, option 2 and option 3. So what I'm trying to set up is have if option 1 is selected run one set of commands and if option 2 run another and so on. I guess I just need to know how to set up the jQuery selector. ...

Is it possible to style a select box?

I've got an HTML select box that I need to style. I'd prefer to use just CSS but if I have to I'll use jQuery to fill in the gaps. Can anyone recommend a good tutorial or plugin? I know, Google, but I've been searching for the last two hours and I'm not finding anything that meets my needs. It needs to be: Compatible with jQuery 1.3...

Set selected option via CSS?

Is it possible to set the selected attribute of an option tag via a CSS class? I'm wondering if something like the following is possible in a stylesheet: option.selected { selected: true; } Then in HTML: <option class="selected"> Which would have the same effect as setting the selected attribute. Is this technique possible? ...

How to POST empty <select .. multiple> HTML elements if empty?

I have the following multi-select box in a HTML form, where user can select one or more option. <select id="eng_0" name="eng_0[]" multiple size="3"> <option value="Privilégier">Privilégier</option> <option value="Accepté">Accepté</option> <option value="Temporaire">Temporaire</option> </select> When the user selects no option, t...

Rendering a hierarchy of "OPTION"s in a "SELECT" tag

My problem is HTML and CSS related. I have a hierarchy type structure that I want to display inside a list. The hierarchy contains Countries, States and Cities (it is three levels deep). I want to display the list inside a select list, each item type (Country, State, City) must be selectable. The items should appear indented as: Unite...

HTML select tag allowing you to access Rails variable

<p class="acp3"> <label>Status</label> <select> <% if <option>Active</option> %> <%= account["status"] == "Active" %> <% elsif <option>Disabled</option> %> <%= account["status"] == "Disabled" %> <% end %> </select> </p> I am creating a selector with the html and I want to be able to have it access that variable...

Optimizing Select Tag in HTML

Hi all, This is in a way a repeat of my previous question here. http://stackoverflow.com/questions/1107944/context-based-search-in-jsp I got a reply to look at this site Ext JS I actually want a combo box like the Transformed Select in that Page.I tried it offline but it behaves as a normal combo box.Is it done using css? Can an...

<select> tag optimization using Javascript

This is technically a repost of this question I tried my best but I could not get what I wanted.The CSS stuff did not work for me.I need your help from scratch to achieve something like the one here.Please help me This is my code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>...

php regex to read select form

Hi, I have a source file with a select form with some options, like this: <option value="TTO">1031</option><option value="187">187</option><option value="TWO">2SK8</option><option value="411">411</option><option value="AEL">Abec 11</option><option value="ABE">Abec11</option><option value="ACE">Ace</option><option value="ADD">Addikt</op...

<select> tag reposting

After several failed attempts using ExtJS I have now decided to use javascript.The requirement is to assist a combo box in select tag.If the list contains aa,aaa,aab,abc,bac,cba then if I type 'ab' continuously then it will select 'abc'.Whereas if I type 'a' time gap and then 'b' it will select 'bac' instead of 'abc'. Can anyone tell me...

Disable keyboard in HTML SELECT tag

I want to disable the keyboard for an HTML SELECT tag so the user can only use a mouse to select the options. I've tried event.cancelBubble=true on the onkeydown, onkeyup and onkeypress events with no luck. Any ideas? ...

How to call javascript function on a select elements selectedIndexChange

I am using ASP.NET with C# I have a HTMLSelect element and i am attemping to call a javascript function when the index of the select is changed. riskFrequencyDropDown is dynamically created in the C# code behind tried: riskFrequencyDropDown.Attributes.Add("onchange", "updateRiskFrequencyOfPointOnMap(" + riskFrequencyDropDown.ID.Subst...

IE6 jquery unable to update select tag options w/ .append

<html> <head> <title></title> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script language="JavaScript" type="text/javascript"> function getcsa(){ $.get("getcsas.php",{},function(xml){ $(xml).find('csa').each(function(){ var csa = $(this); var vzid = $(csa).find('vzid').text(); var fir...

jQuery Plugin to replace HTML select with keyboard support for IE6

I'm looking for a jQuery plugin that either replaces or improves the HTML <select> tag in Internet Explorer 6. Think of this situation: <select name="test"> <option>Apple</option> <option>Apricot</option> <option>Lemon</option> <option>Peach</option> <option>Pear</option> <option>Raspberry</option> </select> W...

Javascript to Select Multiple options

I have a form with a select box that allows multiple options. After a user saves these options, it stores them in a database table. I can then read this database table to get the options they chose one again. I need to be able to grab this data from the database, put it into an array, then have the options in that select box to be pre-...