943,608 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Unsolved
  • Views: 1280
  • ColdFusion RSS
Jan 28th, 2009
0

a help in my url

Expand Post »
Hi, I have one Code in my URL:

as:

localhost/project1/index.cfm?catID=1&siteName=http://www.sqlserver.com

I want to extract only:

http://www.sqlserver.com

how can i do that, i try using the listfunctions but no help.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
dodo123456 is offline Offline
8 posts
since Dec 2008
Jan 30th, 2009
0

Re: a help in my url

I would assume the
ColdFusion Syntax (Toggle Plain Text)
  1. url.sitename
should extract what you want.
Reputation Points: 27
Solved Threads: 0
Light Poster
danarashad is offline Offline
43 posts
since Jan 2007
Feb 1st, 2009
0

Re: a help in my url

Yep,

You can always see whats in the URL scope by cfdumping it like so:
ColdFusion Syntax (Toggle Plain Text)
  1. <cfoutput><cfdump var="#URL#"></cfoutput>
on the target page.

You can check to see whats in the URL.sitename variable like so:
ColdFusion Syntax (Toggle Plain Text)
  1. <cfoutput>#URL.sitename#</cfoutput>
better still tou can do some checking first to see if the variable exists and isn't empty:
ColdFusion Syntax (Toggle Plain Text)
  1. <cfoutput>
  2. <cfif isdefined('URL.sitename') AND #URL.sitename# NEQ "">
  3. #URL.sitename#
  4. </cfif>
  5. </cfoutput>
Last edited by jedimatt; Feb 1st, 2009 at 10:13 am. Reason: added a some more code examples
Reputation Points: 10
Solved Threads: 1
Newbie Poster
jedimatt is offline Offline
20 posts
since Jan 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: <CFQUERY> and INSERT problem
Next Thread in ColdFusion Forum Timeline: query cfoutput help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC