Showing posts with label onclick. Show all posts
Showing posts with label onclick. Show all posts

Monday, March 26, 2012

window.opener.document.TextBoxRateLockDate is null or not an object

My ASP.Net page has a calendar picker link with an onclick event as shown below:

<a href="http://links.10026.com/?link=javascript:;" onclick="calendarPicker('TextBoxRateLockDate');" title="Pick Date from Calendar"><img src="http://pics.10026.com/?src=../../../../App_Images/simplecalendar/calendar.gif" border="0" /></a>

The above link is inside of a MultiView control, which is inside an UpdatePanel control. The link pops-up the date picker calendar just fine but when I select a date , I get the following error:

Microsoft Jscript runtime error:
'window.opener.document.TextBoxRateLockDate' is null or not an object

How can I resolve this issue?

Hi,

This is a pure javascript issue.

I'd suggest using document.getElementById() method to find the textbox. Usually like this: window.opener.document.getElementById("TextBoxRateLockDate")

Hope this helps.