Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Referencing a TextBox control in Javascript from DataList ItemTemplate

Reply
Thread Tools

Referencing a TextBox control in Javascript from DataList ItemTemplate

 
 
Candice
Guest
Posts: n/a
 
      12-05-2003
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datalist referencing a textbox with javascript =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?= ASP .Net 3 10-25-2007 04:17 PM
Referencing Controls on ItemTemplate in FormView Control mike@5starserv.com ASP .Net Web Controls 2 01-28-2007 01:23 PM
can code inside a Repeater's ItemTemplate modify controls in the ItemTemplate? Bennett Haselton ASP .Net 1 09-24-2004 01:59 AM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Resizing Image control in DataList ItemTemplate David W. Simmonds ASP .Net 10 01-27-2004 10:30 AM



Advertisments