Possible Duplicate:
Find DOM element by ID when ID contains square brackets?
I am unable to get the value of form elements that are somewhat crazy. For example I have a HTML form element that "has" to have the name of "data[User][notify_one_day_out]
". The problem is that I am unable to get the value of the form element.
<label for="data[User][notify_one_day_out]">One day away:</label>
<select name="slider" id="data[User][notify_one_day_out]" data-role="slider">
<option value="0">OFF</option>
<option value="1" selected="selected">ON</option>
</select>
However
alert( $("#data[User][notify_one_day_out]").val());
comes out as undefined. Any help?