From: mkt on
I have a .cfm called edit_activity that has two date fields that I am using
window_datepopup.cfm to try and load these fields with the user select eddate.
The window_datepopup.cfm does popup the calendar window but when I click on a
date it does not close the window and put the date in the field. Can anyone
tell me what I am doing wrong?
Thanks


This is the edit_activity.cfm
<body>
<CFINCLUDE TEMPLATE="HEADER.CFM"><BR><BR><BR>
<cfquery name="act_type_dropdown" datasource="crm">
SELECT *
FROM act_type
</cfquery>
<cfquery name="act_subtype_dropdown" datasource="crm">
SELECT *
FROM act_sub_type
</cfquery>
<cfquery name="act_status_dropdown" datasource="crm">
SELECT *
FROM act_status
</cfquery>
<cfquery name="act_bus_line_dropdown" datasource="crm">
SELECT *
FROM act_business_line
</cfquery>
<cfquery name="get_activities" datasource="crm">
SELECT id, type, sub_type, begin_date_time, end_date_time, brief_description,
status, due, contact_first_name, contact_last_name, assigned_to,
meeting_location, no_of_customers, account_partner_name, account_key,
agency_short_name, detailed_explanation, business_line_supported, created,
created_by, created_by_service, region
FROM activities
WHERE id=#url.edit_activity_id#
</cfquery>

<font size="+2"><font color="#000080"><strong><div align="center">EDIT
ACTIVITIES</div></strong></font></font><BR><BR>
<BR><BR>
<cfform action="update_activities.cfm" method="POST" enablecab="Yes">
<table cellspacing="0" cellpadding="0" align="center"
bordercolordark="#000000">
<cfoutput query="get_activities">
<tr>
<th align="left" nowrap><font color="##FF0000"><font size="-1">*Type</th>
<td width="35" rowspan="14"></td>
<th align="left" nowrap><font color="##000080"><font size="-1">Begin Date
Time</th>
<td width="35" rowspan="14"></td>
<th align="left" nowrap><font color="##000080"><font size="-1">Business
Line Supported</th>
</tr>
<tr>
<td nowrap><cfselect name="type" size="1" query="act_type_dropdown"
display="act_type" selected="#get_activities.type#"
tabindex="1">#type#</cfselect></td>

<form name="DateForm">
<td valign="middle"><input type="text" name="StartDate"><a
href="javascript:ShowCalendar('DateForm', 'StartDate')"><img
src="calendar_icon.gif" border="0"></a></td>
</form>
<!---
<td nowrap><cfinput type="Text" name="begin_date_time"
value="#begin_date_time#" required="No" size="45" maxlength="40"
tabindex="17"></td>
--->
<td nowrap><cfselect name="business_line_supported" size="1"
query="act_bus_line_dropdown" display="act_business_line"
selected="#get_activities.business_line_supported#"
tabindex="1">#business_line_supported#</cfselect></td>
</tr>
<tr>
<th align="left" nowrap><font color="##000080"><font size="-1">Sub
Type</th>
<th align="left" nowrap><font color="##000080"><font size="-1">End Date
Time</th>
<th align="left" nowrap><font color="##000080"><font size="-1">Contact
Last Name</th>
</tr>
<tr>
<td nowrap><cfselect name="sub_type" size="1" query="act_subtype_dropdown"
display="sub_type" selected="#get_activities.sub_type#"
tabindex="1">#sub_type#</cfselect></td>

<form name="DateForm">
<td valign="middle"><input type="text" name="EndDate"><a
href="javascript:ShowCalendar('DateForm', 'EndDate')"><img
src="calendar_icon.gif" border="0"></a></td>
</form>

<!---
<td nowrap><cfinput type="Text" name="end_date_time"
value="#end_date_time#" required="No" size="45" maxlength="40"
tabindex="17"></td>
--->
<td nowrap><cfinput type="Text" name="contact_last_name"
value="#contact_last_name#" required="No" size="35" maxlength="30"
tabindex="17"></td>
</tr>
<tr>
<th align="left" valign="bottom" nowrap><font color="##000080"><font
size="-1">Brief Description</th>
<th align="left" nowrap><font color="##000080"><font size="-1">Status</th>
<th align="left" nowrap><font color="##000080"><font size="-1">Contact
First Name</th>
</tr>
<tr>
<td rowspan="5" nowrap><cftextarea cols="30" rows="6"
name="brief_description">#brief_description#</cftextarea> </td>
<td nowrap><cfselect name="status" size="1" query="act_status_dropdown"
display="act_status" selected="#get_activities.sub_type#"
tabindex="1">#sub_type#</cfselect></td>
<td nowrap><cfinput type="Text" name="contact_first_name"
value="#contact_first_name#" required="No" size="35" maxlength="30"
tabindex="17"></td>
</tr>
<tr>
<th align="left" nowrap><font color="##000080"><font size="-1">Meeting
Location</th>
<th align="left" nowrap><font color="##000080"><font size="-1">No of
Customers</th>
</tr>
<tr>
<td nowrap><cfinput type="Text" name="meeting_location"
value="#meeting_location#" required="No" size="40" maxlength="35"
tabindex="17"></td>
<td nowrap><cfinput type="Text" name="no_of_customers"
value="#no_of_customers#" required="No" size="10" maxlength="5"
tabindex="17"></td>
</tr>
<tr>
<th align="left" nowrap><font color="##000080"><font size="-1">Detail
Explanation</th>
<th align="left" nowrap><font color="##000080"><font size="-1">Account
Partner Name</th>
</tr>
<tr>
<td rowspan="5" nowrap><cftextarea cols="40" rows="6"
name="edtailed_explanation">#detailed_explanation#</cftextarea> </td>
<td nowrap><cfinput type="Text" name="account_partner_name"
value="#account_partner_name#" required="No" size="60" maxlength="60"
tabindex="17"></td>
</tr>
<tr>
<th align="left" nowrap><font color="##000080"><font size="-1">Due
Date</th>
<th align="left" nowrap><font color="##000080"><font size="-1">Account
Key</th>
</tr>
<tr>
<td nowrap><cfinput type="Text" name="due" value="#due#" required="No"
size="45" maxlength="40" tabindex="17"></td>
<td nowrap><cfinput type="Text" name="account_key" value="#account_key#"
required="No" size="65" maxlength="60" tabindex="17"></td>
</tr>
<tr>
<th align="left" nowrap><font color="##000080"><font size="-1">Assigned
To</th>
<th align="left" nowrap><font color="##000080"><font size="-1">Agency
Short Name</th>
</tr>
<tr>
<td nowrap><cfinput type="Text" name="assigned_to" value="#assigned_to#"
required="No" size="15" maxlength="10" tabindex="17"></td>