Referencing a TextBox control in Javascript from DataList ItemTemplate

Discussion in 'ASP .Net Datagrid Control' started by Candice, Dec 5, 2003.

  1. Candice

    Candice Guest

    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?
    Candice, Dec 5, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer
    Replies:
    2
    Views:
    566
    VB Programmer
    Apr 8, 2004
  2. Nevyn Twyll
    Replies:
    8
    Views:
    1,867
  3. Bennett Haselton
    Replies:
    1
    Views:
    5,328
    Joe Fallon
    Sep 24, 2004
  4. =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?=

    Datalist referencing a textbox with javascript

    =?Utf-8?B?TmVpbCBTdGV2ZW50b24=?=, Oct 25, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    706
    Teemu Keiski
    Oct 25, 2007
  5. Replies:
    2
    Views:
    315
Loading...

Share This Page