a help in my url

Reply

Join Date: Dec 2008
Posts: 6
Reputation: dodo123456 is an unknown quantity at this point 
Solved Threads: 1
dodo123456 dodo123456 is offline Offline
Newbie Poster

a help in my url

 
0
  #1
Jan 28th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 21
Reputation: danarashad is an unknown quantity at this point 
Solved Threads: 0
danarashad's Avatar
danarashad danarashad is offline Offline
Newbie Poster

Re: a help in my url

 
0
  #2
Jan 30th, 2009
I would assume the
  1. url.sitename
should extract what you want.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 20
Reputation: jedimatt is an unknown quantity at this point 
Solved Threads: 1
jedimatt jedimatt is offline Offline
Newbie Poster

Re: a help in my url

 
0
  #3
Feb 1st, 2009
Yep,

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

You can check to see whats in the URL.sitename variable like so:
  1. <cfoutput>#URL.sitename#</cfoutput>
better still tou can do some checking first to see if the variable exists and isn't empty:
  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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ColdFusion Forum


Views: 1163 | Replies: 2
Thread Tools Search this Thread



Tag cloud for ColdFusion
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC