John6854654654 Posted December 28, 2010 Share Posted December 28, 2010 I am trying to create a page with two parts: a top bar, and a content area below. The content area is an iframe with someone elses site in it. The top bar is my content. I want my top bar to go away and show only what is within the iframe when a user clicks a button. Essentially a redirect to whatever the current location of the iframe is. It is as if the user right clicked on the iframe and clicked "show only this frame". I can almost do this using javascript, but I have only been able to send the user to the original iframe location, and not the current iframe location. I understand that grabbing the current iframe location and storing it in a variable or something cannot be done, but is there another way to go about this? Thanks in advance! [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
dragon_sa Posted December 28, 2010 Share Posted December 28, 2010 you could place a <div> tag over the iframe with a full size spacer image and the href set to the website Quote Link to comment Share on other sites More sharing options...
mattyvx Posted January 3, 2011 Share Posted January 3, 2011 I want my top bar to go away and show only what is within the iframe when a user clicks a button. Thanks in advance! <a href="#" onclick="document.getElementById('1').style.display='none'">Hide</a> <a href="#" onclick="document.getElementById('1').style.display=''">Show</a> <iframe src='http://www.google.com' id='1' name='1' /> Adapt the above code, should work fine! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.