Jump to content

Get page name


Recommended Posts

How can I get the name of the page I am browsing? If I am on a page called page_e.cfm, I want the link to be page_f.cfm so basically change _e for _f.

Link to post
Share on other sites

when in doubt, use this to investigate exactly what you need.<cfdump var"#cgi#" label="Use at will CGI variables!">I put this and even a session dump in my "onrequestend.cfm" file. I keep it there commented out so I can easily get the information whenever i want. Not sure if you know that, but the "onrequestend.cfm" file works just like the "application.cfm" file except that it gets run at the end of every file. Its helpful in a number of situations.

Link to post
Share on other sites
  • 8 months later...

this code will help u just check it out<cfparam name="URL.startrow" default="1" /><cfset nNextRows = URL.startrow + 2 /><cfset nPreviousRows = URL.startrow - 2 /><head><title>Pageable Record</title></head><table><cfoutput><tr> <cfif nNextRows LTE 10> <td><a href="#CGI.SCRIPT_NAME#?startrow=#nNextRows#">Next Record</a></td> </cfif> <cfif nPreviousRows GTE 1> <td><a href="#CGI.SCRIPT_NAME#?startrow=#nPreviousRows#">Previous Record</a></td> </cfif></tr></cfoutput><cfoutput query="pageable" startrow="#url.startrow#" maxrows="2"><tr> <td>#per_name#</td> <td>#per_phone#</td></tr></table></cfoutput><body></body></html>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...