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

extracting portion of URL

Status
Not open for further replies.
<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
<!--
var myurl = &quot;var splited = new Array;
splited = myurl.split('&');
alert(splited[1]);
// -->
</script> ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Thank you for your reply.

Silly....Easy question. How do I get the URL if it is a variable??

Something like location.search.?????

Many thanks
 
var URL = location.href;
or
URL = window.location;
or
URL = window.location.href;
 
jemminger is right
but if your in frame
u could also do
top.location
self.location
framename.location
happy that helped ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top