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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get current page as variable 1

Status
Not open for further replies.

Wes98765

Programmer
Jul 31, 2002
135
US
How do I get the current page from the url to include any url variables?

Ex.
I use <cfoutput>#GetFileFromPath(GetTemplatePath())#</cfoutput>

and get index.htm I need to get index.htm?lookup=test

THanks for any help

WEs
 
Try this:

<cfoutput>#CGI.SCRIPT_NAME#?#CGI.QUERY_STRING#</cfoutput>


#CGI.SCRIPT_NAME# - gets the name of the current page from the url.

#CGI.QUERY_STRING# - gets the query string attached in the url.

Hope This Helps!

Ecobb

&quot;Alright Brain, you don't like me, and I don't like you. But lets just do this, and I can get back to killing you with beer.&quot; - Homer Simpson
 
I changed it to
#GetFileFromPath(GetTemplatePath())#?#CGI.QUERY_STRING#
and it worked great thanks.

cgi.script_Name returns the folder path as well as the page.

Thanks

Wes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top