scripter73
Programmer
Hi,
Am I saying the following correctly? My goal is to set a <cfform> element to a certain value based on the value of another setting:
I'm saying if my current page was called by 'homepage.cfm', set a value, else set another value:
<cfif #session.caller_page# eq 'homepage.cfm'>
<cfset session.processid = 1>
<cfelse>
<cfset session.processid = 2>
</cfif>
....later in the same page I say:
<TABLE width=35% cellpadding=0 cellspacing=0 border=0>
<TR>
<TD><cfinput type="text" name="startmonth_sweep" value="IIF(#session.processid# is 1,#form.startmonth#,#session.startmonth_sweep#)" maxlength=2 size=3></TD>
<TD><cfinput type="text" name="startday_sweep" value="IIF(#session.processid# is 1,#form.startday#,#session.startday_sweep#)" maxlength=2 size=3>/</TD>
<TD><cfinput type="text" name="startyear_sweep" value="IIF(#session.processid# is 1,#form.startyear#,#session.startyear_sweep#)" maxlength=4 size=5></TD>
In all of my books, they use something called DE() within IIF?
Any help's appreciated.
scripter73
Change Your Thinking, Change Your Life.
Am I saying the following correctly? My goal is to set a <cfform> element to a certain value based on the value of another setting:
I'm saying if my current page was called by 'homepage.cfm', set a value, else set another value:
<cfif #session.caller_page# eq 'homepage.cfm'>
<cfset session.processid = 1>
<cfelse>
<cfset session.processid = 2>
</cfif>
....later in the same page I say:
<TABLE width=35% cellpadding=0 cellspacing=0 border=0>
<TR>
<TD><cfinput type="text" name="startmonth_sweep" value="IIF(#session.processid# is 1,#form.startmonth#,#session.startmonth_sweep#)" maxlength=2 size=3></TD>
<TD><cfinput type="text" name="startday_sweep" value="IIF(#session.processid# is 1,#form.startday#,#session.startday_sweep#)" maxlength=2 size=3>/</TD>
<TD><cfinput type="text" name="startyear_sweep" value="IIF(#session.processid# is 1,#form.startyear#,#session.startyear_sweep#)" maxlength=4 size=5></TD>
In all of my books, they use something called DE() within IIF?
Any help's appreciated.
scripter73
Change Your Thinking, Change Your Life.