select-tag

select_tag is sorting (strangely) [Rails]

I have a select box that looks like this (within a form_for) <%=f.select(:whatever_id, {"blah"=>0, "blah2"=>1, "blah3"=>2, "blah4"=>3}, {:include_blank => true}) %> and the output is good, but weird... like this: <select id="personal_information_whatever_id" name="personal_information[whatever_id]"><option value=""></option> <optio...

Rails question for complex select boxes...

I return a form partial on a set of info like so... Room1 Monday Tuesday Wednesday No. ppl Blue Room $55 $55 $55 Select_tag (0-8) Double Bed $100 $110 $200 Select_tag (0-8) <% for room in @rooms %> <tr> <th scope="row" class="<%= cycle("spec", "specalt") -%>"><%=h roo...

OnChange problem with select_tag with '/' and '.' characters in Rails

I have an select_tag (rails) that loaded a select value with '/' and '.' character in it. The select tag's onchange redirects the page (using window.location) using concatenated url with the value of the select tag. These are the things I tried to isolate the problem. Invokes alert javascript to show the concatenated value. Added url...

HTML - Put SELECT tag content into INPUT type = "text"

Hi, I have a form in a webpage where I would like to put the selected item in a drop down list into a testbox. The code I have till now is the following: <form action = ""> <select name = "Cities"> <option value="----">--Select--</option> <option value="roma">Roma</option>...

Reading multiple instances of a tag or element using XSLT

My RDF xml file is something like this.. <rdf:RDF> <rdf:Description rdf:about="........"> <j.0:property rdf:resource="....."/> <j.0:property rdf:resource=....."/> <j.0:property rdf:resource="........"/> </rdf:Description> </rdf:RDF> Now in my XSLT stylesheet I need to retrieve the values of all the j.0:...

multiple records using the select_tag

Update: To clear up confusion: by multiple records I mean multiple individuals at once. Each voter would have their own select__tag, this is the reason I want to pass the ID as a hash. I'm attempting to display multiple records, with each record displaying its own selection box. I would like to submit this form and pass a hash, having t...

Set value to Symfony custom select_month_tag item

I am using the select_month_tag and select_day_tag in a new Symfony 1.0 project (I know, out of date, but it's what we're using). In any case, when using the tag I know I can set the default first item in the select object to a custom item by using 'include_custom'=>'My Custom Value'. However, by default, Symfony does not give this fir...

How to disable select tag options through jQuery? Need help

I have a query regarding Select tags option. plz any one solve through jQuery. Suppose i have two select tags, in the first select tags i have options of Languages and script and in the second tag of select i have option regarding languages & scripting. The problem is that if i select languages from 1st select tag than only languages opt...

Rails: Returning a blank select option with observe_field?

I have an observe_field call in my app like this: = observe_field "marketSelect", :update => "merchantSelect", :with => "id", :url => { :controller => "markets", :action => "get_merchants" } That code activates the following action in my markets controller: @merchants = @market.merchants.sort_by { |merchants| merchants.name } Tha...

Setting option value as array index in a select with rails

I want to create a select tag using rails collection_select or options_for_select with the items of an array which are not model based. The value of the option should be the array index of each item. Example: desired output for ['first', 'second', 'third']: <select id="obj_test" name="obj[test]"> <option value="0">first</option> ...