Rails form - Only submit the visible element (2x element with same id)

i got this:

A form with 2 select fields, both of them have the same id. I want that only the visible one gets submitted. Is there an solution for? Like adding an attribute to the element so that rails know?

Answers


Duplicate id on same page is very bad practice. I suggest you to change them to unique ids instead of hacking a solution.


Need Your Help

i feel confused with jquery's load

jquery dom load this ready

with jquery,how can i do something just after the dom loaded,i write like this:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.