Link to home
Start Free TrialLog in
Avatar of nbierm65
nbierm65

asked on

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

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.
Avatar of nbierm65
nbierm65

ASKER

(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.)

ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial