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

Display URL from the client side

Status
Not open for further replies.

irbk

MIS
Oct 20, 2004
578
US
So I have a SharePoint site, that through an iFrame, displays an aspx page. Ultimately, what I want to do is be able to display a 2nd iFrame, based on what the SharePoint URL that the client sees. Unfortunatly, when ever I call the current URL through either a JavaScript
Code:
 document.write(location.href);
or through an ASP
Code:
Request.Url.PathAndQuery
It gives me the URL of the page in the iFrame, not the URL of the page calling the iFrame. It was suggested to me that I try to use client side javascript to display the URL of the page, but I don't know how to do that.
Any suggestions?

Thanks in advance.
 
try this:
Code:
alert(top.location.href);

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
Hey that worked! Great! Now all I have to do is figure out how to use JavaScript to pass a var to asp and find the jade monkey by the next full moon.
 
Now all I have to do is figure out how to use JavaScript to pass a var to asp

Only by making a new HTTP request. By either passing the values in the querystring when loading a new page, submitting the form values via a post submission, or using an AJAX routine to send the data to the server.

and find the jade monkey by the next full moon.

Um.... I think you're in the wrong forum for that one.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson

[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
 
I believe you could probally post it in the "Crazy Space Monkey" forum.... ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top