datalist edit mode and javascript pop up calendar

Discussion in 'ASP .Net' started by Ravikanth[MVP], Jul 18, 2003.

  1. Hi

    Check whether textbox control name is 'txtDischargeDate'
    or it contains automatically generated id?

    HTH
    Ravikanth


    >-----Original Message-----
    >Dear ASP.NET Programmers,
    >
    >I am using a javascript to display popup calendar and

    return the selected
    >date to the control in the calling form. No problems

    here. When I use this
    >script for a control that is created in datalist edit

    mode, the popup
    >calendar doesn't return the date because it cannot find

    the control (or I
    >think so). Is there any way to work around this? I use

    the following code:
    >
    ><script language="Javascript">
    > function GetDate(ctrlName)
    > {
    > childWindow = window.open('popup.aspx?formName=' +
    > document.forms[0].name + '&ctrlName=' +

    ctrlName, "PopUpCalendar",
    > "width=350, height=230, top=200, left=200,

    toolbars=no, scrollbars=no,
    >status=no, resizable=no");
    > }
    >
    > function CloseWindow()
    > {
    > childWindow.close()
    > }
    > </script>
    > <script language="JavaScript">
    >
    ><A href="javascript:GetDate('txtDischargeDate')"><IMG
    >src="images/smallcalendar.gif" border="0"></A>
    >
    >Thanks in advance,
    >
    >Buran
    >
    >
    >.
    >
     
    Ravikanth[MVP], Jul 18, 2003
    #1
    1. Advertising

  2. Ravikanth[MVP]

    buran Guest

    The control name is 'txtDischargeDate' and it is automatically created when
    in edit mode. How can I reference it in Javascript?

    Buran

    "Ravikanth[MVP]" <> wrote in message
    news:04ef01c34d14$906ea1c0$...
    > Hi
    >
    > Check whether textbox control name is 'txtDischargeDate'
    > or it contains automatically generated id?
    >
    > HTH
    > Ravikanth
    >
    >
    > >-----Original Message-----
    > >Dear ASP.NET Programmers,
    > >
    > >I am using a javascript to display popup calendar and

    > return the selected
    > >date to the control in the calling form. No problems

    > here. When I use this
    > >script for a control that is created in datalist edit

    > mode, the popup
    > >calendar doesn't return the date because it cannot find

    > the control (or I
    > >think so). Is there any way to work around this? I use

    > the following code:
    > >
    > ><script language="Javascript">
    > > function GetDate(ctrlName)
    > > {
    > > childWindow = window.open('popup.aspx?formName=' +
    > > document.forms[0].name + '&ctrlName=' +

    > ctrlName, "PopUpCalendar",
    > > "width=350, height=230, top=200, left=200,

    > toolbars=no, scrollbars=no,
    > >status=no, resizable=no");
    > > }
    > >
    > > function CloseWindow()
    > > {
    > > childWindow.close()
    > > }
    > > </script>
    > > <script language="JavaScript">
    > >
    > ><A href="javascript:GetDate('txtDischargeDate')"><IMG
    > >src="images/smallcalendar.gif" border="0"></A>
    > >
    > >Thanks in advance,
    > >
    > >Buran
    > >
    > >
    > >.
    > >
     
    buran, Jul 18, 2003
    #2
    1. Advertising

  3. Ravikanth[MVP]

    buran Guest

    The control name is txtDischargeDate. No problems there. Any suggestions?

    Buran

    "Ravikanth[MVP]" <> wrote in message
    news:04ef01c34d14$906ea1c0$...
    > Hi
    >
    > Check whether textbox control name is 'txtDischargeDate'
    > or it contains automatically generated id?
    >
    > HTH
    > Ravikanth
    >
    >
    > >-----Original Message-----
    > >Dear ASP.NET Programmers,
    > >
    > >I am using a javascript to display popup calendar and

    > return the selected
    > >date to the control in the calling form. No problems

    > here. When I use this
    > >script for a control that is created in datalist edit

    > mode, the popup
    > >calendar doesn't return the date because it cannot find

    > the control (or I
    > >think so). Is there any way to work around this? I use

    > the following code:
    > >
    > ><script language="Javascript">
    > > function GetDate(ctrlName)
    > > {
    > > childWindow = window.open('popup.aspx?formName=' +
    > > document.forms[0].name + '&ctrlName=' +

    > ctrlName, "PopUpCalendar",
    > > "width=350, height=230, top=200, left=200,

    > toolbars=no, scrollbars=no,
    > >status=no, resizable=no");
    > > }
    > >
    > > function CloseWindow()
    > > {
    > > childWindow.close()
    > > }
    > > </script>
    > > <script language="JavaScript">
    > >
    > ><A href="javascript:GetDate('txtDischargeDate')"><IMG
    > >src="images/smallcalendar.gif" border="0"></A>
    > >
    > >Thanks in advance,
    > >
    > >Buran
    > >
    > >
    > >.
    > >
     
    buran, Jul 22, 2003
    #3
    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. Saravana
    Replies:
    2
    Views:
    2,092
    Saravana
    Jul 25, 2003
  2. John J Lee
    Replies:
    3
    Views:
    550
    bruno at modulix
    Dec 1, 2005
  3. Ravi Gudlavalleti

    pop-up windows in edit mode

    Ravi Gudlavalleti, Jun 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    128
    Eliyahu Goldin
    Jun 23, 2004
  4. Frank Kurka
    Replies:
    8
    Views:
    343
  5. Jaime Stuardo

    GridView control enters edit mode when I click Edit link twice

    Jaime Stuardo, Apr 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    451
    Jaime Stuardo
    Apr 7, 2006
Loading...

Share This Page