Thank you Joe for replying.
I am using ColdFusion. Here's part of the form.cfm and GetTime.cfm:
form.cfm
<tr><td align=right nowrap="nowrap"><b>Signature Staff: </td>
<td><select name="select_employee" id="select_employee" onchange="showTime(this.value,
document.apptform.appointment_date.value, '');">
<option value="All">All</option>
<cfloop query = "GetEmployees">
<cfif GetEmployees.EMPLOYEE_ID eq '#chg_select_employee#'>
<cfset select = "SELECTED">
<cfelse>
<cfset select = "">
</cfif>
<cfoutput><option value="#GetEmployees.EMPLOYEE_ID#"
#select#>#GetEmployees.NICK_NAME#</option></cfoutput>
</cfloop>
</select></td>
<td align=right><b>Select Date: </td>
<td><select name="appointment_date" id="appointment_date"
onchange="showTime(document.apptform.select_employ ee.value, this.value, '');">
<option value=''>[Select]</option>
<cfloop list="#datelist#" index="thedate">
<cfif thedate eq '#chg_appointment_date#'>
<cfset select='SELECTED'>
<cfelse>
<cfset select=''>
</cfif>
<cfoutput><option value="#thedate#" #select#>#thedate#</option></cfoutput>
</cfloop>
</select></td>
</tr>
<tr><td align=right valign=top><b>Available Time: </td>
<td valign=top><span id="TimeList">
<select name="available_time">
<option value=""></option>
</select></span></td>
GetTime.cfm
<CFINCLUDE TEMPLATE="include.cfm">
<cfset timelist = arrayToList(structSort(atime, "numeric"))>
<cfset timelist1 = arrayToList(structSort(atime1, "numeric"))>
<span>
<select name="available_time">
<cfif trim(URL.nicknm) eq 'All'>
<option value=''>[Select]</option>
<cfloop list='#timelist#' index='time'>
<cfif time EQ '#trim(url.ti)#'>
<cfset select = 'SELECTED'>
<cfelse>
<cfset select = ''>
</cfif>
<cfoutput><option value="#atime[time]#" #select#>#time#</option></cfoutput>
</cfloop>
<cfelse>
<cfquery name="getEmployee" datasource="signatu_datasource" cachedwithin="#createTimeSpan(0,0,0,-1)#">
select * from SIGNATU_APPOINTMENT
where EMPLOYEE_ID = "#trim(URL.nicknm)#"
and DATE = "#trim(URL.dt)#"
</cfquery>
<cfset tempTimeList = ValueList(getEmployee.TIME)>
<cfif getEmployee.RecordCount GT 0>
<option value=''>[Select]</option>
<cfloop list="#tempTimeList#" index="theTime">
<cfloop list='#timelist1#' index='current_time'>
<cfif current_time eq '#theTime#'>
<cfset d = StructDelete(atime1, "#current_time#", "True")>
</cfif>
</cfloop>
</cfloop>
<cfset timelist2 = arrayToList(structSort(atime1, "numeric"))>
<cfloop list='#timelist2#' index='time2'>
<cfif time2 EQ '#trim(url.ti)#'>
<cfset select = 'SELECTED'>
<cfelse>
<cfset select = ''>
</cfif>
<cfoutput><option value="#atime1[time2]#" #select#>#time2#</option></cfoutput>
</cfloop>
<cfelse>
<option value=''>[Select]</option>
<cfloop list='#timelist1#' index='curr_time'>
<cfif curr_time EQ '#trim(url.ti)#'>
<cfset select = 'SELECTED'>
<cfelse>
<cfset select = ''>
</cfif>
<cfoutput><option value="#atime1[curr_time]#" #select#>#curr_time#</option></cfoutput>
</cfloop>
</cfif>
</cfif>
</select>
</span>
When I pass #form.available_time# to the next page, I got error on FireFox, 'form.available_time' undefined.
|