Jump to content

Get page name


vchris

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 comment
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 comment
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 comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...