473,385 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

datalist edit mode and javascript pop up calendar

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 selecteddate to the control in the calling form. No problems here. When I use thisscript for a control that is created in datalist edit mode, the popupcalendar doesn't return the date because it cannot find the control (or Ithink 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
.

Nov 17 '05 #1
2 15260
The control name is 'txtDischargeDate' and it is automatically created when
in edit mode. How can I reference it in Javascript?

Buran

"Ravikanth[MVP]" <dv*********@hotmail.com> wrote in message
news:04****************************@phx.gbl...
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
.

Nov 17 '05 #2
The control name is txtDischargeDate. No problems there. Any suggestions?

Buran

"Ravikanth[MVP]" <dv*********@hotmail.com> wrote in message
news:04****************************@phx.gbl...
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
.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Alex | last post by:
Interested in more .NET stuff visit www.dedicatedsolutions.co.uk The DataList is not as powerful as the DataGrid. It requires more work from you since it has no default data presentation format....
0
by: Alex | last post by:
Imports System Imports System.Data Imports System.Data.SqlClient Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Configuration Public Class Main : Inherits Page ...
1
by: Gilles T. | last post by:
I have calendar control in Javascript including in the Head of mu page: <script charset="iso-8859-1" language="JavaScript" src="popcalendar.js"></script> I call this calendar popup with a image...
8
by: Adam Billmeier | last post by:
Problem: I am trying to use FindControl to grab a dropdownlist that is in the EditItemTemplate of a Datalist and then Bind it to a dataset. I also then need to put the correct values in all of...
0
by: Luis Esteban Valencia | last post by:
Hi, I'm in serious need of help. I have a datalist that will list a number of 'Agents'. When the user selects the edit button of my datalist, I put it into edit mode. When putting the datalist...
1
by: Chris Kettenbach | last post by:
Good Afternoon all, I have a datalist. When I switch in to edit mode, I need to hide a couple controls on the "ItemTemplate" and of course, when exiting Edit Mode, I will need to show these items...
4
by: Jerry Camel | last post by:
Once the datalist is in edit mode and the text boxes and all happily appear, how can I force the textbox to be the control with focus, so the user can start editing without having to click the...
0
by: dhoward | last post by:
Actually we're in a datalist. It sorta in the edit mode. Let me see if I can explain this. To bind the causetype and causedetail dropdownlist to the table in the edit mode I use the top code (1.)...
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.