html-select

How to do drop-down box like "More action" in gmail

I see the "More Action" drop-down box in gmail inbox page. It has levels and some disabled item in the list. How to do that in HTML+CSS? Thank you ...

javascript select() function with named anchor

I want to use the JavaScript select() function to highlight a text field on a form, but first I want to use a named anchor so the page will scroll to the proper section. The following code works pretty well in Firefox, (Unless you enter the same value twice,) but IE does not allow the highlighted text to be typed over (without a tab or a...

How do I display the selected values in an <html:select> when the page loads?

I have a JSP page which contains an HTML <select> populated with all countries loaded from a database. Say for example, on "create user" all the country values are loaded in the select menu and I select 5 countries. Those 5 values are loaded into database for that particular user. Now when I click on "modify user" for that userid again ...

Coloring of Select html element by jquery

Hi All, I need some help with jquery script again :-) Just trying to play with jquery..I use script below for coloring options of select element. It works in pure html, but in my asp.net 2.0 (Master + Content pages) does not. Script is placed in Head section. function pageLoad(){ var allOddSelectOption = "select option:odd"; var...

Strange reload effect in Firefox

Hi, I have a page generated by php which includes two drop-down lists (SELECTs) which contain a lot of items (about 2,000 each). The page is fine, but when it loads in Firefox, there's a delay during the load, and then it seems to refresh the entire page. If a user tries to click on anything before the "reload" occurs, it has no effect....

How to post the selections of an HTML List Box with multiple selected values

I have a listbox on an HTML form with a Submit button. The listbox has multiple selection enabled. I am able to select multiple values in the listbox, but I don't know how to figure out what values were selected when the form is submitted. Also, I am adding user generated values to the list box dynamically using JavaScript, and I woul...

How to make this jQuery function more elegant?

On my page I have a drop-down select box, with a default value of (empty). When the user selects an entry, the appropriate form for that entry type is displayed. Couple of problems.. The code is not DRY and seems more verbose than it needs to be, so not easily maintainable / extensible. When a user selects something, fills in the form...

Javascript: How to dynamically create an <option> that contains an HTML entity (— ... «)

I'd like to add an <option> element to a <select> element where the <option> element's text contains an HTML entity: &mdash; In HTML, the code would look like this: <select name="test" id="test"> <option value="">&mdash; Select One &mdash;</option> </select> My Javascript code looks like this: function selectOne() { var e = docume...

Linked drop down lists and load div

Hello ! I`m kind of new when it comes to programming but am trying to learn. What I need to do for my site is have 2 or 3 linked drop down menus so when I select an item from the first one, the second one will refresh with other options. I have found a way to do this using java but I cannot seem to make it with the refresh div part. I l...

Change border color on <select> HTML form.

Is it possible to change the border color on a <select> element in an HTML form? The border-color style works in Firefox but not IE. I could find no real answers on Google. ...

Fill select dropdown based on selected item

I'm working on a rails app. I have a dropdown with countries. Selecting a country would fill the city dropdown with the cities in that country. I know how to do this server-side, but I'd like to do it client-side if possible. I've used the RJS helpers, but I've no experience with jQuery (not exactly even sure what it is) or the other...

Height of an HTML select box (dropdown)

Can someone confirm that its not possible to change the height of a dropdown that is shown when you click on a select box. The size attribute of the select makes it look like a list, the height attribute in the CSS doesnt do much good either. ...

Problem with <h1> in drop down menu?

I am using this menu on my web page <select id="menu"> <option value="1"><h1>one</h1></option> <option value="2"><h1>two</h1></option> <option value="3"><h1>three</h1></option> </select> I would like to know why <h1>...</h1> is not working. Thanks!!! in advance. ...

jQuery Magic with hook_form_alter in Drupal

There isn't much tutorial in the Pro Drupal book about ahah, but I'm trying to start off with something simple. I have two content types, 'topic' and 'tips' and categories. The topics are a node reference field in tips. The topics are organized by category. When filling out the form for a tip, I would like the category the topic belongs...

Styling HTML SELECT in Internet Explorer

Any way to customize the border and background of an HTML SELECT in IE? I can style the border with simple CSS in Firefox, but apparantly not in IE. ...

Add a new item to html-select list without leaving the page. How?

Hello all, I've always wondered what is the best way to add a new item to html-select in a website. Yes, this may sound silly but it is a great problem from the usability perspective. I don't want the user to be taken to a new page every time they need to add new item to a html-select. I like the way Google Reader and Gmail handle this...

Looping through all select elements with JavaScript Prototype library

How can I (if it is possible) use the Prototype library to loop through all select elements on a page and access the element? In the documentation I found easily shortcuts for referencing elements with certain ids, class names etc. but no reference for elements with certain tag names. If this is not possible with Prototype, an example w...

Faster way to populate <select> with Javascript

I have two <select> boxes on a form. Selecting an item in the first <select> box will determine what should appear in the second <select> (Using Ajax http_request). In some cases there can be a large 500 (guess) items in the second select and it takes time 5-10 seconds to update in IE. Firefox seems to work perfectly. I wonder if th...

IE Input Select Box

I'm looking for the easiest solution to fixing a problem I have in Internet Explorer (6,7 & 8), be it CSS or using jQuery. I have a SELECT Input with a defined width (because of where it sits in the layout). Because of the defined width select is cut off from showing their full values, unlike in Firefox & Safari where they are automatica...

Custom dropdown box using javascript and css

hi everyone, Is it possible to create a custom dropdown box using javascriit and css. for which i need to place a background-image for dropdown box using javascript If yes or no ? if yes . give any suggestion ? without using JQuery Thanks & Regards Ravi ...