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

Getting the HREF location

Status
Not open for further replies.

jl8789

MIS
May 22, 2003
293
0
0
US
I am trying to find my current page location in the url when on a certain page. How can I do it so that all I am checking for is "Qadsmain.cfm" since the site root will be changing when we move the application across site locations?

if (opener.location.href == "
So all I want to do is get the href, and then chop it down so all I care about is the Qadsmain.cfm part.

Thanks!
 
var sTemp=opener.location.href;

if(sTemp.indexOf("Qadsmain.cfm")>-1){
//your url includes Qadsmain.cfm
}else{
//your url does not include Qadsmain.cfm
}

This will check if indexOf returns a value greater than -1, any number greater than -1 means found, a -1 means your string was not found in the url.

MrGreed

"did you just say Minkey?, yes that's what I said."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top