get value of pop-up datepicker in a dynamically created textbox

orb1234

Newcomer
Joined
Aug 13, 2003
Messages
5
Hi All,
I have a page where I create a set of controls (Labels, Textboxes, etc.) dynamically from an XML document. Some of the labels have a function associated with them that calls a pop-up Datepicker. Everything works fine until I choose a date in the Datepicker. When it returns to the original window (the "window.opener" window) it can't find the dynamically created textbox it should fill. when I do it with a "hard-coded" textbox it works fine. The textbox must be dynamically created according to the definitions in the XML so I have to stick to it. :o
Please help me solve this one...
Thanks
 
orb1234 said:
Hi All,
I have a page where I create a set of controls (Labels, Textboxes, etc.) dynamically from an XML document. Some of the labels have a function associated with them that calls a pop-up Datepicker. Everything works fine until I choose a date in the Datepicker. When it returns to the original window (the "window.opener" window) it can't find the dynamically created textbox it should fill. when I do it with a "hard-coded" textbox it works fine. The textbox must be dynamically created according to the definitions in the XML so I have to stick to it. :o
Please help me solve this one...
Thanks

if your main page is doing a postback, maybe the dynamic control isn't re-created yet when you pass the value? try using a session variable for the value you pass from a page to another

just a thought ...
 
orb1234 said:
Hi All,
I have a page where I create a set of controls (Labels, Textboxes, etc.) dynamically from an XML document. Some of the labels have a function associated with them that calls a pop-up Datepicker. Everything works fine until I choose a date in the Datepicker. When it returns to the original window (the "window.opener" window) it can't find the dynamically created textbox it should fill. when I do it with a "hard-coded" textbox it works fine. The textbox must be dynamically created according to the definitions in the XML so I have to stick to it. :o
Please help me solve this one...
Thanks
I dont believe window.opener is available to popup windows. I thought they were only available to framed documents.

are you using window.showModalDialog to open the page that contains the date time picker?

window.showModalDialog returns the window.returnValue of the page that it opened.

In the datepicker page, set window.returnValue equal to the datepicker value when closing.
 
Last edited:
Back
Top