Basically what I'm doing is making a pop up calendar that'll be used to select a day.
The calendar has text links, when clicked it runs my function.
That function is suppose to parse the date and send it back to the parent window, put the focus on it, then close the window.
However I'm getting this error when the function is called:Here's the function
Code:
function select_date(clicked_date)
{
var clicked_month;
var clicked_day;
var clicked_year;
clicked_month = clicked_date.substring(0,2);
clicked_day = clicked_date.substring(3,5);
clicked_year = clicked_date.substring(6,10);
// alert(clicked_month + '/' + clicked_day + '/' + clicked_year);
opener.document.req_info.select1.selectedIndex.value = clicked_month;
opener.document.req_info.select2.selectedIndex.value = clicked_day;
opener.document.req_info.select3.selectedIndex.value = clicked_year;
opener.focus();
window.close();
}
And this is how i'm calling it:
Code:
<TD VALIGN=MIDDLE class="tinytext2" nowrap id="reverse1" align="center" valign="middle" onMouseOver="this.style.backgroundColor='#6688AA'; this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#384D6C';" onClick="select_date(07-01-2003)">
That date is dynamically generated.
Bookmarks