Connecting Tech Pros Worldwide Help | Site Map

datalist edit mode and javascript pop up calendar

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 17th, 2005, 06:02 PM
Ravikanth[MVP]
Guest
 
Posts: n/a
Default datalist edit mode and javascript pop up calendar

Hi

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

HTH
Ravikanth

[color=blue]
>-----Original Message-----
>Dear ASP.NET Programmers,
>
>I am using a javascript to display popup calendar and[/color]
return the selected[color=blue]
>date to the control in the calling form. No problems[/color]
here. When I use this[color=blue]
>script for a control that is created in datalist edit[/color]
mode, the popup[color=blue]
>calendar doesn't return the date because it cannot find[/color]
the control (or I[color=blue]
>think so). Is there any way to work around this? I use[/color]
the following code:[color=blue]
>
><script language="Javascript">
> function GetDate(ctrlName)
> {
> childWindow = window.open('popup.aspx?formName=' +
> document.forms[0].name + '&ctrlName=' +[/color]
ctrlName, "PopUpCalendar",[color=blue]
> "width=350, height=230, top=200, left=200,[/color]
toolbars=no, scrollbars=no,[color=blue]
>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
>
>
>.
>[/color]

  #2  
Old November 17th, 2005, 06:02 PM
buran
Guest
 
Posts: n/a
Default Re: datalist edit mode and javascript pop up calendar

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

Buran

"Ravikanth[MVP]" <dvravikanth@hotmail.com> wrote in message
news:04ef01c34d14$906ea1c0$a001280a@phx.gbl...[color=blue]
> Hi
>
> Check whether textbox control name is 'txtDischargeDate'
> or it contains automatically generated id?
>
> HTH
> Ravikanth
>
>[color=green]
> >-----Original Message-----
> >Dear ASP.NET Programmers,
> >
> >I am using a javascript to display popup calendar and[/color]
> return the selected[color=green]
> >date to the control in the calling form. No problems[/color]
> here. When I use this[color=green]
> >script for a control that is created in datalist edit[/color]
> mode, the popup[color=green]
> >calendar doesn't return the date because it cannot find[/color]
> the control (or I[color=green]
> >think so). Is there any way to work around this? I use[/color]
> the following code:[color=green]
> >
> ><script language="Javascript">
> > function GetDate(ctrlName)
> > {
> > childWindow = window.open('popup.aspx?formName=' +
> > document.forms[0].name + '&ctrlName=' +[/color]
> ctrlName, "PopUpCalendar",[color=green]
> > "width=350, height=230, top=200, left=200,[/color]
> toolbars=no, scrollbars=no,[color=green]
> >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
> >
> >
> >.
> >[/color][/color]


  #3  
Old November 17th, 2005, 06:09 PM
buran
Guest
 
Posts: n/a
Default Re: datalist edit mode and javascript pop up calendar

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

Buran

"Ravikanth[MVP]" <dvravikanth@hotmail.com> wrote in message
news:04ef01c34d14$906ea1c0$a001280a@phx.gbl...[color=blue]
> Hi
>
> Check whether textbox control name is 'txtDischargeDate'
> or it contains automatically generated id?
>
> HTH
> Ravikanth
>
>[color=green]
> >-----Original Message-----
> >Dear ASP.NET Programmers,
> >
> >I am using a javascript to display popup calendar and[/color]
> return the selected[color=green]
> >date to the control in the calling form. No problems[/color]
> here. When I use this[color=green]
> >script for a control that is created in datalist edit[/color]
> mode, the popup[color=green]
> >calendar doesn't return the date because it cannot find[/color]
> the control (or I[color=green]
> >think so). Is there any way to work around this? I use[/color]
> the following code:[color=green]
> >
> ><script language="Javascript">
> > function GetDate(ctrlName)
> > {
> > childWindow = window.open('popup.aspx?formName=' +
> > document.forms[0].name + '&ctrlName=' +[/color]
> ctrlName, "PopUpCalendar",[color=green]
> > "width=350, height=230, top=200, left=200,[/color]
> toolbars=no, scrollbars=no,[color=green]
> >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
> >
> >
> >.
> >[/color][/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.