How do you get the URL of an iframe on your page into the browser bar, a la StumbleUpon?

nbierm65
nbierm65 used Ask the Experts™
on
I like how StumbleUpon's navbar at the top of a shared page allows you to close the bar and let the page stand on its own. With the bar on, the url is stumbleupon plus the url of the iframe (the external page URL) in a query string. Below the bar is an iframe with the content of the external page being viewed/recommended (say, a cnn.com story). Toggle the bar off and the page "stands on its own"--no bar, no iframe, just the external page's URL (say, http://cnn.com/123.html ) in the browser's address bar. I'd like to do this on our website for recommended links. But I don't know how to get the iframe to fill/"stand on its own" when the bar is toggled off (closed) in jQuery.

Bonus: could you even get the share bar to toggle back on: re-appear, re-iframe the external page, re-populate the browser's address bar with the embedded url: ' myurl.com/?url=cnn.com '  My mind boggles.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
(OK, SU doesn't use a query string, but makes the URL a subdirectory (presumably via redirect from a query string): stumbleupon.com/123/cnn.com/page.html.)

(Forget the re-appear thing. The back button works on SU to get the bar back and that's probably good enough. Unless it's easy to re-toggle.)

IT Expert
Top Expert 2009
Commented:
It is a query string too, it is just using path-info instead of ?...

To close the banner use
<a href="your url" target="_top">Close</a>


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial