probi
05-27-2012, 06:42 PM
Hi All,
I have a popup calendar that I want a user to be able to click a date and for it to update a field on the previous page.
I've tried the following code:
<SCRIPT LANGUAGE="JavaScript">
function updateDate(){
window.opener.document.getElementById(startdate).value = "12/05/12";
self.close();
return false;
}
</SCRIPT>
but when clicking on the date nothing at all happens.
I'm trying to get it so that any part of the DIV can be clicked on and the field I want to update is startdate, the code I'm using inside my DIV tag is
onclick="updateDate()"
I'm very new to javascript so probably doing something very stupid!
Thanks in advance
I have a popup calendar that I want a user to be able to click a date and for it to update a field on the previous page.
I've tried the following code:
<SCRIPT LANGUAGE="JavaScript">
function updateDate(){
window.opener.document.getElementById(startdate).value = "12/05/12";
self.close();
return false;
}
</SCRIPT>
but when clicking on the date nothing at all happens.
I'm trying to get it so that any part of the DIV can be clicked on and the field I want to update is startdate, the code I'm using inside my DIV tag is
onclick="updateDate()"
I'm very new to javascript so probably doing something very stupid!
Thanks in advance