|
From: brianism on 21 Aug 2006 11:20 Wondering if anyone knows the best way to add a link on an action page that will take a user back to a completed query page. What I have is a query results page that allows to edit or delete, after the action of either edit or deleting I need to bring the user back to the first query page so they can edit or delete more if they wish. This sounds easy but I can't figure out how to do it. I am assuming I will need to pass the completed query information through to my action page so I can link back to it? Below is my code: ----------------------------------- Query Page (finddate.cfm): <cfquery name="qstudents" datasource="ardexseminars"> SELECT * FROM registrants WHERE seminardate = '#seminardate#' ORDER BY seminardate, seminar </cfquery> <form action="groupdelete.cfm" method="post"> <cftable query = "qstudents" startRow = "1" colheaders colSpacing = "6" HTMLTable border="1" headerlines="2"> <!--- each cfcol tag sets width of a column in table, and specifies header information and text/CFML with which to fill cell ---> <cfcol header = "<c>Admin</c>" align = "Left" width = 25 text = "<a href=editstudent.cfm?id=#id#>Edit</a> | <input type=checkbox name=remove value=#id#>Delete | <a href=viewsaved.cfm?letterid=#id#>View Saved</a>"> <cfcol header = "<c>Seminar</c>" align = "Left" width = 25 text = "#seminar#;#seminar_type#"> <cfcol header = "<c>Seminar Date</c>" align = "Left" width = 25 text = "#seminardate#"> <cfcol header = "<c>Name</c>" align = "Left" width = 25 text = "<a href=display.cfm?id=#id#>#name1#</a>"> </cftable> <br> <center> <input type="submit" value="Delete Selected"> </center> </form> ------------------------------- Action Page (groupdelete.cfm) <cfquery name="delstudents" datasource="ardexseminars"> DELETE FROM registrants WHERE id IN (#form.remove#) </cfquery> Registration info deleted <br><br> <A HREF="no idea what to put here..">Back</A> ----------- That back link is where I need to bring them back to the query page (finddate.cfm). Thanks in advance for any help.
From: jdeline on 21 Aug 2006 12:34 >> <A HREF="no idea what to put here..">Back</A> <A HREF="finddate.cfm">Return to the previous page.</A> If you need to send back a couple of variables, att them to your URL. For example, you mention returning to a "completed query page." You might want to send back finddate.cfm?seminardate=#seminardate# and requery the database.
From: brianism on 22 Aug 2006 16:31 thanks for the advice. I tried setting the url to finddate.cfm?seminardate=#seminardate# and then passing to the final action page using <input type="hidden" name="url" value="finddate.cfm?seminardate=#seminardate# "> but it gave me an error about not being able to pass strings?
|
Pages: 1 Prev: Sourceless Deploy Doesn't Work On Linux! Next: HEX timestamp in AS/400 QHST |