datetime_select generates html code that I can't have access

<%= datetime_select 'datetime'+@indice.to_s, 'end_date' , :start_year =>
2006%>

generates:
<TD colspan=2 ><select name="datetime0[end_date(1i)]">
<option value="2006" selected="selected">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>

<option value="2010">2010</option>
<option value="2011">2011</option>
</select>
<select name="datetime0[end_date(2i)]">
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
....

And I want to access the value that the user has selected. I have tried
with
document.form_event.datetime0[end_date(1i)]
but javascript gives me an error: "missing ) after argument list" just
after the (1i)
any idea
thanks in advance

I think something like this would work...

document.form_event.elements["datetime0[end_date(1i)]"].xxxxxxx

-philip

Philip Hallstrom wrote:

document.form_event.elements["datetime0[end_date(1i)]"].xxxxxxx

Holy crap, that's fantastic. How have I managed to not notice this
before?

Thanks!

Chris