Question ASP.Net/JScript Calendar "Problem"

aar0n

Member
Joined
Jan 17, 2008
Messages
19
Location
40 Miles S. of Nashville, TN
Programming Experience
5-10
I'm sure I'm missing something here.

All I need to do is simply refresh my parent page when the JavaScript calendar control, CLOSES. I can only seem to get the "Onclick" handler to work, which is not what I need. This causes it to refresh upon OPENING the control. I did not write the code for this control. It is used as the calendar throughout the app.

The code is very lengthy, so I only included what I think is relevent to the problem. I tried to use a modal window but I'm thinking my issue may be something else.

From the Calendar Control code:

Function signature:
VB.NET:
function show_calendar_date(str_target, str_datetime)
Relevent Code from above function:
VB.NET:
vWinCal = window.open("", "Calendar","width=200,height=210,status=no,resizable=no,top="+screen.width/3+" ,left="+screen.height/2+"");

Function called in the Asp.Net source code...as you can see, I've already tried a couple of things.
VB.NET:
function reload()
{
    show_calendar_date_modal('document.aspnetForm.ctl00$ContentPlaceHolder2$txtIntPaidDt', document.aspnetForm.ctl00$ContentPlaceHolder2$txtIntPaidDt.value);
    //window.location.refresh(); 
    __doPostBack(txt.name,'0');
}


Any help here would be greatly appreciated. I'm definitely not a JavaScript expert.
-Aaron
 
Update:

I consulted with a developer who I work with who knows more than me, and I feel better now because he felt there was no easy way to do it.

The reason why I needed to refresh the parent page was for a recalculation of a "payoff amount", handled on the server side, based on a number of days of interest accrued.

I just placed a "recalculate" link on the page to force the user to refresh rather than trying to get the control to fire an event to do it.

I suspect I did not get any responses here because either it is not easy to do, or, I may not have articulated the problem clearly enough.

Anyway, thanks to anyone who took time to think about it.
 
Back
Top