Ask a Question related to ASP.NET General, Design and Development.
-
Ravikanth[MVP] #1
datalist edit mode and javascript pop up calendar
Hi
Check whether textbox control name is 'txtDischargeDate'
or it contains automatically generated id?
HTH
Ravikanth
return the selected>-----Original Message-----
>Dear ASP.NET Programmers,
>
>I am using a javascript to display popup calendar andhere. When I use this>date to the control in the calling form. No problemsmode, the popup>script for a control that is created in datalist editthe control (or I>calendar doesn't return the date because it cannot findthe following code:>think so). Is there any way to work around this? I usectrlName, "PopUpCalendar",>
><script language="Javascript">
> function GetDate(ctrlName)
> {
> childWindow = window.open('popup.aspx?formName=' +
> document.forms[0].name + '&ctrlName=' +toolbars=no, scrollbars=no,> "width=350, height=230, top=200, left=200,>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] Guest
-
Edit button not converting to edit mode
I too had the same problem today. I've users set up as writers role to update content thru Contribute. We have two admins including my self. We... -
Edit button not converting to edit mode
Do you (or the client, rather), by chance, have desktop firewall installed? Some of those programs will block ftp traffic. If so, you may see if you... -
Would like to load a datagrid already in edit mode instead of having the user click the edit button
Now my asp.net datagrid shows an edit button and clicking it puts the datagrid in edit mode. I would like to: 1) possilby load the page already... -
Need help with Datagrid Control in edit mode and Javascript
I have calendar control in Javascript including in the Head of mu page: <script charset="iso-8859-1" language="JavaScript"... -
how to call a function in datalist edit mode
The "following procedure" you mentioned is structured like an Event Handler. Is there some reason for this? Why don't you just leave off the Event... -
buran #2
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...> Hi
>
> Check whether textbox control name is 'txtDischargeDate'
> or it contains automatically generated id?
>
> HTH
> Ravikanth
>
>> return the selected> >-----Original Message-----
> >Dear ASP.NET Programmers,
> >
> >I am using a javascript to display popup calendar and> here. When I use this> >date to the control in the calling form. No problems> mode, the popup> >script for a control that is created in datalist edit> the control (or I> >calendar doesn't return the date because it cannot find> the following code:> >think so). Is there any way to work around this? I use> ctrlName, "PopUpCalendar",> >
> ><script language="Javascript">
> > function GetDate(ctrlName)
> > {
> > childWindow = window.open('popup.aspx?formName=' +
> > document.forms[0].name + '&ctrlName=' +> toolbars=no, scrollbars=no,> > "width=350, height=230, top=200, left=200,> >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 Guest
-
Saravana #3
Re: datalist edit mode and javascript pop up calendar
Check out this article, i have explained about the similar problem in
datagrid. Problem is with the name of the control which you are passing to
javascript function. For solution check this article.
[url]http://www.microsoft.com/india/msdn/articles/PopupCalendarinASP.aspx[/url]
--
Saravana
Microsoft India Community Star,
MCAD,SE,SD,DBA.
"buran" <buran@buran.com> wrote in message
news:eRb0cPQTDHA.2256@TK2MSFTNGP11.phx.gbl...> 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
>
>
Saravana Guest
-
buran #4
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...> Hi
>
> Check whether textbox control name is 'txtDischargeDate'
> or it contains automatically generated id?
>
> HTH
> Ravikanth
>
>> return the selected> >-----Original Message-----
> >Dear ASP.NET Programmers,
> >
> >I am using a javascript to display popup calendar and> here. When I use this> >date to the control in the calling form. No problems> mode, the popup> >script for a control that is created in datalist edit> the control (or I> >calendar doesn't return the date because it cannot find> the following code:> >think so). Is there any way to work around this? I use> ctrlName, "PopUpCalendar",> >
> ><script language="Javascript">
> > function GetDate(ctrlName)
> > {
> > childWindow = window.open('popup.aspx?formName=' +
> > document.forms[0].name + '&ctrlName=' +> toolbars=no, scrollbars=no,> > "width=350, height=230, top=200, left=200,> >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 Guest
-
buran #5
Re: datalist edit mode and javascript pop up calendar
Dear Saravana,
The article helped me a lot, but I still cannot find the solution. I use the
following code:
Private Sub dliStayDetails_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataListItemEventArgs) Handles
dliStayDetails.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
Dim imgCal As New System.Web.UI.WebControls.Image()
imgCal = CType(e.Item.FindControl("imgCal1"),
System.Web.UI.WebControls.Image)
imgCal.Attributes.Add("Onclick", "javascript:pickDate('" &
e.Item.FindControl("txtAdmDate").ClientID & "')")
End If
End Sub
and I get "Object reference not set to an instance of an object" for the
line with the attribute.
Thanks,
Buran
"Saravana" <saravank@sct.co.in> wrote in message
news:ewsuwwRTDHA.3500@tk2msftngp13.phx.gbl...to> Check out this article, i have explained about the similar problem in
> datagrid. Problem is with the name of the control which you are passingselected> javascript function. For solution check this article.
> [url]http://www.microsoft.com/india/msdn/articles/PopupCalendarinASP.aspx[/url]
>
> --
> Saravana
> Microsoft India Community Star,
> MCAD,SE,SD,DBA.
>
>
> "buran" <buran@buran.com> wrote in message
> news:eRb0cPQTDHA.2256@TK2MSFTNGP11.phx.gbl...> > Dear ASP.NET Programmers,
> >
> > I am using a javascript to display popup calendar and return thethis> > date to the control in the calling form. No problems here. When I useI> > 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 (orcode:> > think so). Is there any way to work around this? I use the following>> >
> > <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 Guest
-
Saravana #6
Re: datalist edit mode and javascript pop up calendar
Can you post your aspx (datagrid)code also.
--
Saravana
Microsoft India Community Star,
MCAD,SE,SD,DBA.
"buran" <buran@buran.com> wrote in message
news:OubI$9nUDHA.1512@TK2MSFTNGP11.phx.gbl...the> Dear Saravana,
>
> The article helped me a lot, but I still cannot find the solution. I useAs> following code:
>
> Private Sub dliStayDetails_ItemDataBound(ByVal sender As Object, ByVal e(or> System.Web.UI.WebControls.DataListItemEventArgs) Handles
> dliStayDetails.ItemDataBound
>
> If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
> ListItemType.AlternatingItem Then
> Dim imgCal As New System.Web.UI.WebControls.Image()
> imgCal = CType(e.Item.FindControl("imgCal1"),
> System.Web.UI.WebControls.Image)
> imgCal.Attributes.Add("Onclick", "javascript:pickDate('" &
> e.Item.FindControl("txtAdmDate").ClientID & "')")
> End If
>
> End Sub
>
> and I get "Object reference not set to an instance of an object" for the
> line with the attribute.
> Thanks,
>
> Buran
>
>
> "Saravana" <saravank@sct.co.in> wrote in message
> news:ewsuwwRTDHA.3500@tk2msftngp13.phx.gbl...> to> > Check out this article, i have explained about the similar problem in
> > datagrid. Problem is with the name of the control which you are passing> selected> > javascript function. For solution check this article.
> > [url]http://www.microsoft.com/india/msdn/articles/PopupCalendarinASP.aspx[/url]
> >
> > --
> > Saravana
> > Microsoft India Community Star,
> > MCAD,SE,SD,DBA.
> >
> >
> > "buran" <buran@buran.com> wrote in message
> > news:eRb0cPQTDHA.2256@TK2MSFTNGP11.phx.gbl...> > > Dear ASP.NET Programmers,
> > >
> > > I am using a javascript to display popup calendar and return the> this> > > date to the control in the calling form. No problems here. When I use> > > script for a control that is created in datalist edit mode, the popup
> > > calendar doesn't return the date because it cannot find the controlscrollbars=no,> I> code:> > > think so). Is there any way to work around this? I use the following> > >
> > > <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,>> >> > > 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
> > >
> > >
> >
>
Saravana Guest



Reply With Quote

