Referencing a TextBox control in Javascript from DataList ItemTemplate

C

Candice

I have a calendar control which pops up as a new window when i click
on my textbox.

The calendar control returns a Javascript function whereby
"TextDateReceived" is the textbox ID.
When i close the calendar, the date is supposed to populate the
textbox ID "TextDateReceived".

<script language='javascript'>
window.opener.document.all['TextDateReceived'].value = '31/12/2003';
window.close();
</script>

I have used this calendar control everywhere in my application for
normal textboxes.
But this time i want to use it for the textboxes in a DataList
ItemTemplate.
I did as per normal and the calendar returns the javascript code as
shown above but it doesn't populate "TextDateReceived" as it could not
be recognised and object not found.

Is there anything i must add to make sure "TextDateReceived" is
referencing correctly?
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top