Hi,
I have a series of pages that are passing variables frm one page to another..In particular
Page 1 Recreates info from a database and is displayed. The variables are then being passed as hidden form fields to page 2 to populate the form with the variables from page 1.
Page 2 then passes to page 3 to display the form field variables.
The problem is that the variables are being displayed twice.
I reckon the problem is because the form fields is being passed to the third page while at the same time I am passing the same variables as hidden form fields to the third page.
The reason why I am using this approach is because if i dont use hidden form fields then page 3 reports an error saying it doesnt know what the variable is, but I'm passing via form fields...Whats going on?
Please help..
I have attached the code extracts for page 1,2,3
Page 1
<CFQUERY DATASOURCE= "ONLINE" NAME="RecreateUserPage">
SELECT *
FROM UserSpecific
WHERE Username= '#Client.username#'
</CFQUERY>
<!--- Querying the database and displaying the webpage the user created on a previous session stored in the DB --->
<CFOUTPUT QUERY= "RecreateUSerPage">
<HTML>
<HEAD>
<TITLE>#title#</TITLE>
</HEAD>
<BODY>
<!--- Display PageHeading Variable --->
<CFIF #Headings1# NEQ ""> <#Headings1#></cfif>
<CFIF #Fonts1# NEQ ""> <Font Face="#Fonts1#"></cfif>
<CFIF #Colours1# NEQ ""> <Font Color="#Colours1#"></cfif>
<CFIF #HLine1# NEQ ""> <#Hline1#></cfif>
<!--- <CFSET Return1=#return#> --->
<CFLOOP Condition="#Return1# GT 0">
<BR>
<CFSET #Return1#=#Return1# - 1>
</CFLOOP>
#heading#
<CFIF #Headings1# NEQ ""> </#Headings1#></cfif>
<CFIF #Fonts1# NEQ ""> </Font></cfif>
<CFIF #Colours1# NEQ ""> </Font></cfif>
<CFIF #HLine1# NEQ ""> </#Hline1#></cfif>
Page2
<!--- Start HEADING Input --->
<B> Heading </b><BR>
<INPUT TYPE="Text" NAME="Heading" VALUE="#Heading#">
<BR>
<SELECT NAME ="#headings1#">
<OPTION VALUE="">#Headings1#
<OPTION VALUE="">No Choice
<OPTION VALUE="H1"> H1
<OPTION VALUE="H2"> H2
<OPTION VALUE="H3"> H3
<OPTION VALUE="H4"> H4
<OPTION VALUE="H5"> H5
<OPTION VALUE="H6"> H6
<INPUT TYPE="submit" VALUE="process">
<INPUT TYPE="reset" VALUE="Clear">
</SELECT>
<SELECT NAME ="#Fonts1#">
<OPTION VALUE="">#Fonts1#
<OPTION VALUE="">No Choice
<OPTION VALUE="Arial"> <FONT FACE="Arial"> Arial </Font>
<OPTION VALUE="Book Antiqua"> <font face="Book Antiqua">Book Antiqua</font>
<OPTION VALUE="Bookman Old Style"><font face="Bookman Old Style">Bookman Old Style</font>
<OPTION VALUE="Courier"><font Face="Courier">Courier </font>
<OPTION VALUE="Garamond">Garamond
<OPTION VALUE="Tahoma">Tahoma
<OPTION VALUE="Times New Roman">Times New Roman
</SELECT>
<SELECT NAME ="#Colours1#">
<OPTION VALUE="">#Colours1#
<OPTION VALUE="">No Choice
<OPTION VALUE="Silver">Silver
<OPTION VALUE="Gray">Gray
<OPTION VALUE="Maroon">Maroon
<OPTION VALUE="Green">Green
<OPTION VALUE="Navy">Navy
<OPTION VALUE="Purple">Purple
<OPTION VALUE="Olive">Olive
<OPTION VALUE="Teal">Teal
<OPTION VALUE="Red">Red
<OPTION VALUE="Lime">Lime
<OPTION VALUE="Blue">Blue
<OPTION VALUE="Magenta">Magenta
<OPTION VALUE="Yellow">Yellow
<OPTION VALUE="Cyan">Cyan
<INPUT TYPE="submit" VALUE="process">
<INPUT TYPE="reset" VALUE="Clear">
<BR>
<BR>
<SELECT NAME ="#HLine1#">
<OPTION VALUE="">#HLine1#
<OPTION VALUE="">No Choice
<OPTION VALUE="HR">Horizontal Rule
<INPUT TYPE="submit" VALUE="process">
<BR>
<INPUT TYPE="Text" NAME="Return1" VALUE="#Return1#">
<INPUT TYPE="submit" VALUE="process">
<BR>
<BR>
The hidden form fields on page 2:
<INPUT TYPE="Hidden" NAME="Heading" VALUE= "#Heading#">
<INPUT TYPE="Hidden" NAME="Headings1" VALUE= "#Headings1#">
<INPUT TYPE="Hidden" NAME="Fonts1" VALUE= "#Fonts1#">
<INPUT TYPE="Hidden" NAME="Colours1" VALUE= "#Colours1#">
<INPUT TYPE="Hidden" NAME="HLine1" VALUE= "#HLine1#">
Page 3:
<CFOUTPUT>
<CFIF #Headings1# NEQ ""> <#Headings1#></cfif>
<CFIF #Fonts1# NEQ ""> <Font Face="#Fonts1#"></cfif>
<CFIF #Colours1# NEQ ""> <Font Color="#Colours1#"></cfif>
<CFIF #HLine1# NEQ ""> <#Hline1#></cfif>
<!--- <CFSET Return1=#return#> --->
<CFLOOP Condition="#Return1# GT 0">
<BR>
<CFSET #Return1#=#Return1# - 1>
</CFLOOP>
#heading#
<CFIF #Headings1# NEQ ""> </#Headings1#></cfif>
<CFIF #Fonts1# NEQ ""> </Font></cfif>
<CFIF #Colours1# NEQ ""> </Font></cfif>
<CFIF #HLine1# NEQ ""> </#Hline1#></cfif>
</CFOUTPUT>
I have a series of pages that are passing variables frm one page to another..In particular
Page 1 Recreates info from a database and is displayed. The variables are then being passed as hidden form fields to page 2 to populate the form with the variables from page 1.
Page 2 then passes to page 3 to display the form field variables.
The problem is that the variables are being displayed twice.
I reckon the problem is because the form fields is being passed to the third page while at the same time I am passing the same variables as hidden form fields to the third page.
The reason why I am using this approach is because if i dont use hidden form fields then page 3 reports an error saying it doesnt know what the variable is, but I'm passing via form fields...Whats going on?
Please help..
I have attached the code extracts for page 1,2,3
Page 1
<CFQUERY DATASOURCE= "ONLINE" NAME="RecreateUserPage">
SELECT *
FROM UserSpecific
WHERE Username= '#Client.username#'
</CFQUERY>
<!--- Querying the database and displaying the webpage the user created on a previous session stored in the DB --->
<CFOUTPUT QUERY= "RecreateUSerPage">
<HTML>
<HEAD>
<TITLE>#title#</TITLE>
</HEAD>
<BODY>
<!--- Display PageHeading Variable --->
<CFIF #Headings1# NEQ ""> <#Headings1#></cfif>
<CFIF #Fonts1# NEQ ""> <Font Face="#Fonts1#"></cfif>
<CFIF #Colours1# NEQ ""> <Font Color="#Colours1#"></cfif>
<CFIF #HLine1# NEQ ""> <#Hline1#></cfif>
<!--- <CFSET Return1=#return#> --->
<CFLOOP Condition="#Return1# GT 0">
<BR>
<CFSET #Return1#=#Return1# - 1>
</CFLOOP>
#heading#
<CFIF #Headings1# NEQ ""> </#Headings1#></cfif>
<CFIF #Fonts1# NEQ ""> </Font></cfif>
<CFIF #Colours1# NEQ ""> </Font></cfif>
<CFIF #HLine1# NEQ ""> </#Hline1#></cfif>
Page2
<!--- Start HEADING Input --->
<B> Heading </b><BR>
<INPUT TYPE="Text" NAME="Heading" VALUE="#Heading#">
<BR>
<SELECT NAME ="#headings1#">
<OPTION VALUE="">#Headings1#
<OPTION VALUE="">No Choice
<OPTION VALUE="H1"> H1
<OPTION VALUE="H2"> H2
<OPTION VALUE="H3"> H3
<OPTION VALUE="H4"> H4
<OPTION VALUE="H5"> H5
<OPTION VALUE="H6"> H6
<INPUT TYPE="submit" VALUE="process">
<INPUT TYPE="reset" VALUE="Clear">
</SELECT>
<SELECT NAME ="#Fonts1#">
<OPTION VALUE="">#Fonts1#
<OPTION VALUE="">No Choice
<OPTION VALUE="Arial"> <FONT FACE="Arial"> Arial </Font>
<OPTION VALUE="Book Antiqua"> <font face="Book Antiqua">Book Antiqua</font>
<OPTION VALUE="Bookman Old Style"><font face="Bookman Old Style">Bookman Old Style</font>
<OPTION VALUE="Courier"><font Face="Courier">Courier </font>
<OPTION VALUE="Garamond">Garamond
<OPTION VALUE="Tahoma">Tahoma
<OPTION VALUE="Times New Roman">Times New Roman
</SELECT>
<SELECT NAME ="#Colours1#">
<OPTION VALUE="">#Colours1#
<OPTION VALUE="">No Choice
<OPTION VALUE="Silver">Silver
<OPTION VALUE="Gray">Gray
<OPTION VALUE="Maroon">Maroon
<OPTION VALUE="Green">Green
<OPTION VALUE="Navy">Navy
<OPTION VALUE="Purple">Purple
<OPTION VALUE="Olive">Olive
<OPTION VALUE="Teal">Teal
<OPTION VALUE="Red">Red
<OPTION VALUE="Lime">Lime
<OPTION VALUE="Blue">Blue
<OPTION VALUE="Magenta">Magenta
<OPTION VALUE="Yellow">Yellow
<OPTION VALUE="Cyan">Cyan
<INPUT TYPE="submit" VALUE="process">
<INPUT TYPE="reset" VALUE="Clear">
<BR>
<BR>
<SELECT NAME ="#HLine1#">
<OPTION VALUE="">#HLine1#
<OPTION VALUE="">No Choice
<OPTION VALUE="HR">Horizontal Rule
<INPUT TYPE="submit" VALUE="process">
<BR>
<INPUT TYPE="Text" NAME="Return1" VALUE="#Return1#">
<INPUT TYPE="submit" VALUE="process">
<BR>
<BR>
The hidden form fields on page 2:
<INPUT TYPE="Hidden" NAME="Heading" VALUE= "#Heading#">
<INPUT TYPE="Hidden" NAME="Headings1" VALUE= "#Headings1#">
<INPUT TYPE="Hidden" NAME="Fonts1" VALUE= "#Fonts1#">
<INPUT TYPE="Hidden" NAME="Colours1" VALUE= "#Colours1#">
<INPUT TYPE="Hidden" NAME="HLine1" VALUE= "#HLine1#">
Page 3:
<CFOUTPUT>
<CFIF #Headings1# NEQ ""> <#Headings1#></cfif>
<CFIF #Fonts1# NEQ ""> <Font Face="#Fonts1#"></cfif>
<CFIF #Colours1# NEQ ""> <Font Color="#Colours1#"></cfif>
<CFIF #HLine1# NEQ ""> <#Hline1#></cfif>
<!--- <CFSET Return1=#return#> --->
<CFLOOP Condition="#Return1# GT 0">
<BR>
<CFSET #Return1#=#Return1# - 1>
</CFLOOP>
#heading#
<CFIF #Headings1# NEQ ""> </#Headings1#></cfif>
<CFIF #Fonts1# NEQ ""> </Font></cfif>
<CFIF #Colours1# NEQ ""> </Font></cfif>
<CFIF #HLine1# NEQ ""> </#Hline1#></cfif>
</CFOUTPUT>