Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving a URL with parameters 1

Status
Not open for further replies.

chlebicki

Technical User
Jul 4, 2006
31
US
Hi,

I am trying to do this. After submitting a form I would like to return to a previous URL that contained URL parameters. What is the best way to do this? Is there a way to save the URL and then recall it later?

Thanks,
Craig
 
Craig,

Here is the other page of code. I have just insert one cookie to be displayed in the dynamic table called "Table 1". If you have any ideas I am all ears.

Thanks,
Craig



<cfcookie name="MyUrl" VALUE="#cgi.SCRIPT_NAME#?#cgi.QUERY_STRING#">
<cfparam name="Time.M_0000_AM" default="0">
<cfparam name="Time.M_0100_AM" default="0">
<cfparam name="Time.M_0200_AM" default="0">
<cfparam name="Time.M_0300_AM" default="0">
<cfparam name="URL.4" default="0">
<cfparam name="URL.20" default="0">
<cfparam name="URL.21" default="0">
<cfparam name="URL.22" default="0">
<cfparam name="URL.6" default="0">
<cfparam name="URL.5" default="0">
<cfparam name="URL.8" default="0">
<cfparam name="URL.9" default="0">
<cfparam name="URL.13" default="0">
<cfparam name="URL.14" default="0">
<cfparam name="URL.15" default="0">
<cfparam name="URL.16" default="0">
<cfparam name="URL.17" default="0">
<cfparam name="URL.18" default="0">
<cfparam name="URL.19" default="0">
<cfparam name="URL.23" default="0">
<cfparam name="URL.24" default="0">
<cfparam name="URL.25" default="0">
<cfparam name="URL.26" default="0">
<cfquery name="rsPamPic" datasource="#Request.DSN#">
SELECT *
FROM C:\CFusionMX7\WHERE PAM_ID = #URL.4# OR
PAM_ID = #URL.20# OR
PAM_ID = #URL.21# OR
PAM_ID = #URL.22#
</cfquery>
<cfquery name="rsPamInformation" datasource="#Request.DSN#">
SELECT *
FROM C:\CFusionMX7\WHERE PAM_ID = #URL.5# OR
PAM_ID = #URL.6# OR
PAM_ID = #URL.8# OR
PAM_ID = #URL.9# OR
PAM_ID = #URL.13# OR
PAM_ID = #URL.14# OR
PAM_ID = #URL.15# OR
PAM_ID = #URL.16# OR
PAM_ID = #URL.17# OR
PAM_ID = #URL.18# OR
PAM_ID = #URL.19# OR
PAM_ID = #URL.23# OR
PAM_ID = #URL.24# OR
PAM_ID = #URL.25# OR
PAM_ID = #URL.26#
</cfquery>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<p>Table #1</p>
<p>&nbsp;</p>

<table border="1" cellpadding="1" cellspacing="1">
<tr>
<td><div align="center">Time</div></td>
<td><div align="center">Serial</div></td>
<td><div align="center">Online</div></td>
<td><div align="center">Price</div></td>
<td><div align="center">PPH</div></td>
<td><div align="center">Video</div></td>
<td><div align="center">Picture</div></td>
<td><div align="center">Sound</div></td>
<td><div align="center">RFID</div></td>
<td><div align="center">Camera</div></td>
<td><div align="center">EstablishmentName</div></td>
<td><div align="center">Venue</div></td>
<td><div align="center">Franchise</div></td>
<td><div align="center">StreetName</div></td>
<td><div align="center">City</div></td>
<td><div align="center">State</div></td>
<td><div align="center">Zip</div></td>
<td><div align="center">Select</div></td>
</tr>
<cfoutput query="rsPamInformation">
<tr>
<td><div align="center">
<cfoutput>
<cfcookie name="myCookie1" value="#Time.M_0000_AM#">
</cfoutput> <a href="../test.cfm?PAM_ID=#rsPamInformation.PAM_ID#">Click Here</a> </div></td>
<td><div align="center">#rsPamInformation.Serial#</div></td>
<td><div align="center">#rsPamInformation.Online#</div></td>
<td><div align="center">#rsPamInformation.Price#</div></td>
<td><div align="center">#rsPamInformation.PPH#</div></td>
<td><div align="center">#rsPamInformation.Video#</div></td>
<td><div align="center">#rsPamInformation.Picture#</div></td>
<td><div align="center">#rsPamInformation.Sound#</div></td>
<td><div align="center">#rsPamInformation.RFID#</div></td>
<td><div align="center">#rsPamInformation.Camera#</div></td>
<td><div align="center">#rsPamInformation.EstablishmentName#</div></td>
<td><div align="center">#rsPamInformation.Venue#</div></td>
<td><div align="center">#rsPamInformation.Franchise#</div></td>
<td><div align="center">#rsPamInformation.StreetName#</div></td>
<td><div align="center">#rsPamInformation.City#</div></td>
<td><div align="center">#rsPamInformation.State#</div></td>
<td><div align="center">#rsPamInformation.Zip#</div></td>
<td><div align="center"></div></td>
</tr>
</cfoutput>
</table>
<p>&nbsp;</p>
<p>Table # 2</p>
<p>&nbsp;</p>

<table border="1" cellpadding="1" cellspacing="1">
<tr>
<td><div align="center">Time</div></td>
<td><div align="center">Serial</div></td>
<td><div align="center">Online</div></td>
<td><div align="center">Price</div></td>
<td><div align="center">PPH</div></td>
<td><div align="center">Video</div></td>
<td><div align="center">Picture</div></td>
<td><div align="center">Sound</div></td>
<td><div align="center">RFID</div></td>
<td><div align="center">Camera</div></td>
<td><div align="center">EstablishmentName</div></td>
<td><div align="center">Venue</div></td>
<td><div align="center">Franchise</div></td>
<td><div align="center">StreetName</div></td>
<td><div align="center">City</div></td>
<td><div align="center">State</div></td>
<td><div align="center">Zip</div></td>
<td><div align="center">Select</div></td>
</tr>
<cfoutput query="rsPamPic">
<tr>
<td background="Step 4 - schedule.cfm"><div align="center"><a href="../test.cfm?PAM_ID=#rsPamPic.PAM_ID#">Click Here </a></div></td>
<td><div align="center">#rsPamPic.Serial#</div></td>
<td><div align="center">#rsPamPic.Online#</div></td>
<td><div align="center">#rsPamPic.Price#</div></td>
<td><div align="center">#rsPamPic.PPH#</div></td>
<td><div align="center">#rsPamPic.Video#</div></td>
<td><div align="center">#rsPamPic.Picture#</div></td>
<td><div align="center">#rsPamPic.Sound#</div></td>
<td><div align="center">#rsPamPic.RFID#</div></td>
<td><div align="center">#rsPamPic.Camera#</div></td>
<td><div align="center">#rsPamPic.EstablishmentName#</div></td>
<td><div align="center">#rsPamPic.Venue#</div></td>
<td><div align="center">#rsPamPic.Franchise#</div></td>
<td><div align="center">#rsPamPic.StreetName#</div></td>
<td><div align="center">#rsPamPic.City#</div></td>
<td><div align="center">#rsPamPic.State#</div></td>
<td><div align="center">#rsPamPic.Zip#</div></td>
<td><div align="center"></div></td>
</tr>
</cfoutput>
</table>
</body>
</html>
 
Craig,

I am going over the code and trying to figure this out pretty much all night. I think what is happening is the form's action submits to itself, then updates the database, and then goes back to my dynamic table via the java code you gave me. But once it goes back to the dynamic form page, the cookie get's set as 0.

I think that is what is happening, but when I try to change the <cfparam name="form.Question1" default="0"> to
<cfparam name="form.Question1" default="1">, the debugger still says the cookie's value is "0".

Any thoughts?
Thanks,
Craig

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top