create javascript timestamp from innerhtml string values
<p>I'd like to create a javascript timestamp based on a rails date_select and time_select property. I attached an onChange function to the select helper and fetching the innerhtml to read the values into a div which works fine. Now I want to use those strings from the select property and create a timestamp in js (using it for validations).</p>

<p>I did first try this by making integers from the innerhtml values:</p>

<pre><code>function insertText10()
{
    var start_day = document.new_link['link[start_at(3i)]'];
    var start_month = document.new_link['link[start_at(2i)]'];
    var start_year = document.new_link['link[start_at(1i)]'];
    var start_hour = document.new_link['link[start_at(4i)]'];   
    var start_minute = document.new_link['link[start_at(5i)]'];

    var selOption1 = start_day[start_day.selectedIndex];
    var selOption2 = start_month[start_month.selectedIndex];
    var selOption3 = start_year[start_year.selectedIndex];
    var selOption4 = start_hour[start_hour.selectedIndex];
    var selOption5 = start_minute[start_minute.selectedIndex];

    start_date = new Date(parseInt(selOption3.innerHTML),parseInt(selOption2.innerHTML),parseInt(selOption1.innerHTML),parseInt(selOption4.innerHTML),parseInt(selOption5.innerHTML),0,0);
</code></pre>

<p>then by using strings:</p>

<pre><code>start_date = new Date(selOption3.innerHTML+selOption2.innerHTML+selOption1.innerHTML+selOption4.innerHTML+selOption5.innerHTML);
</code></pre>

<p>but neither works.
What am I doing wrong?</p>

<p>--
PS: I checked the w3s docu <a href="http://www.w3schools.com/jsref/jsref_obj_date.asp" rel="nofollow">http://www.w3schools.com/jsref/jsref_obj_date.asp</a> to find the solution above.</p>
