Repost: Calendar Issue!

A

Adam Knight

Hi all,

I have a page containing a aspx calendar.
This page appears in a pop up window via a javascript open window command.

What i need to acheive is, once a user has selected a date.
This window is to close and pass back the selected date to the calling page.

In classic asp i would use the following javascript when a user selected a
calendar item to achieve this:
javascript:self.opener.set_date('myFormElement','mydateval');
window.close();

I have tried attaching this to the aspx calendar via the OnDayRender Method;
thus adding the javascript to the calendar cells. But when i select a date
nothing happens.

Any ideas on what i need to do or how i can acheive this with .net?

Any suggestions appreciated!

Cheers,
Adam
 
J

Juan T. Llibre

Hi, Adam.

Would you please post the solution, so all can benefit from it ?

Thanks!
 
A

Adam Knight

Hi guys,

Attaching the following code to the OnDayRender method of the Calendar works
fine:

javascript:self.opener.set_date('myFormElement','mydateval');
window.close();

My problem was an oversight; i failed to specify the correct
'myFormElement'.

Here is the javascript function used: (parent window)
// JavaScript Document
function set_date(jsId, date_val) {

var fromEl = document.getElementById(jsId);
fromEl.value = date_val;

}

Cheers,
Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Calendar! 1
Taskcproblem calendar 4
Mutability issue 1
AJAX Calendar extender issue 2
Calendar 1
Calendar control issue 4
Calendar... 1
Non-popup calendar control? 5

Members online

Forum statistics

Threads
473,787
Messages
2,569,627
Members
45,328
Latest member
66Teonna9

Latest Threads

Top