datalist edit mode and javascript pop up calendar

R

Ravikanth[MVP]

Hi

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

HTH
Ravikanth
 
B

buran

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

Buran

Ravikanth said:
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


.
 
B

buran

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

Buran

Ravikanth said:
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


.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top