The following will show Yahoo home page in an iframe, but the URL in the address bar will be yours, and it stays the same, even if the user clicks on some link and go to another site.
If you ever tried to create an iframe, you noticed that you have two scroll bars - one of the page and one of the iframe. Well, the following code solves that too. The piece of code that most people are looking for is marked in red.
<html>
<head>
<style type="text/css">
html {
overflow: hidden;
}
</style>
</head>
<body><iframe name='FRAME1' src='http://www.yahoo.com' width='100%' height='100%' marginheight='0' marginwidth='0' scrolling='auto' frameborder='0'>
<p>Your browser does not support iframes.</p>
</iframe>
</body></html>
This is brilliant!One more question: How do u hide the url in the browser status bar on mouse hover or click?
ReplyDeleteRegards,
Shayne
shayne.alvares@gmail.com
awesome..!!! really helpful..TQ!!
ReplyDeleteWow! this is simply superb. I hv been searching on google for this.
ReplyDeleteBut at last your code helped me alot.
All the best and keep going.
How about an online site. How do you implement this?
ReplyDeleteThousand thanks for sharing, this small piece of code is just the lifesaver to me.
ReplyDeleteThumb up and all the best
yeah i got the code but what should i do with it????? should i paste it any where or???
ReplyDeleteit didnt work on Chrome or Safari for me!!!
ReplyDeleteIs it possible to disable the url in iframe..?
ReplyDeletehows that possible????????????????
ReplyDeletei tried this code but did not worked :(
ReplyDeleteIt's not showing the Url I mentioned ...
I merged it in my html code..but had no error but still showing the original URL in browser :(
thx
looooooom
ReplyDeletewill it work for blackberry html5 apps also for Bb 7.0 OS and 10 OS ?
ReplyDeleteAny body answer will it really work for web applications (HTML5 apps) for Nokia and Blackberry too
ReplyDeleteThen what is the config.xml
ReplyDeleteThanks a ton. It works brilliantly!!
ReplyDeleteSome websites use script to detect iframe embedding like this and break the page loading if they found. But most of the sites would display w/o any complaints. Great examples!
ReplyDeleteNot Working..
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteCan you do the same for the status bar also?
ReplyDeleteHide status bar..?
It doesn't hide the url in addressbar
ReplyDelete"Code that works" - not here :|.
ReplyDeleteCould you maybe comment on these issues? Did we do something wrong? What could be the reasons? If you could point us in the direction where the issues lie, that would be enough.
Its useless??
ReplyDeleteHow come people says it works.It shows the url in source code.Or I came seeking in wrong place?
This comment has been removed by the author.
ReplyDeletetry this code (dont miss add iframe tag in the first and last )
ReplyDeletewidth="100%" height="520" scrolling="no" frameborder="0" allowtransparency="true" src="http://tinyurl.com/hgh9ogx"
fuck dis shit, check meh out on pronhub.com
ReplyDeleteawesome thanks for share this
ReplyDeleteyaar
visit from pagal & awesome songs.
ReplyDeleteIt's 2021 now, and most sites will use mechanisms to avoid being embedded in an iFrame. Your article is correct for 2009, but not for 2021. Sorry! :-)
ReplyDelete