Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Okay, I have an arcade website where there is a feature that allows the visitor to 'hide' the site from pearing eyes. Basically when they click the link it will open an iframe inside of a div that spans the full page with google being inside the iframe, it also changes the title of the page to "Google".
The only thing that I have left for it to hide is the scrollbars, currently it shows the length of the scrollbar for my site, but google doesnt have a scrollbar!
So i need to make the scrollbars dissapear, it needs to use javascript though as thats what this script is currently using.
Also is there anyway I can also replace what is inside the address bar to "www.google.com" the same way I changed the title bar?
http://www.iblob.info
http://www.iblobarcade.com

You can get rid of the scrollbar - BUT that's not really what you want. When you are on a page that doesn't require scrolling there is still a scrollbar, it is just disabled (on IE).
Anyway, you can get rid of the scrollbar with this:
document.body.style.overflow = 'hidden';
If you want the scrollbar to be absolutely correct you will have to get a little more fancy. For example, put your entire arcade page within a DIV and then when you switch to the google "page" have your arcade DIV resized to a very small size such that the page would have the disabled scroll bars.
As for changing the text in the address bar I don't think it's possible (at least any longer) - it would be a huge security risk. you could try and get creative again and have your arcade page load without an address bar at all and use an image of an address bar with google in it. Just an idea.
Michael J

Hm.. okay thanks, Im not that worried about the address bar so much. Probably shouldnt protect the slackers that much anyway lol.
Next question, How would I be able to get a div to popup and show where the user is scrolled at. For example, right now the div pops up at the very top of the page, so if they are scrolled down at all, then google is chopped in half and they then cant get to the close link to get rid of the div. I need it to work even if they have scrolled down on the page at all, so that the div will appear there instead of the very top.
Hope that made sence.
http://www.iblob.info
http://www.iblobarcade.com

I don't know, but it should definitely be doable. I see some adds that move down the page as you scroll, so you could use the same logic as those.
Or, you could go back to the idea of putting the arcade content in a div as well. Then you could shrink that div down to 1 x 1 and then make the google dive the same height and width as the page.
Or, now that I think of it, just use two divs as I stated above, but switch the display property on both from visible to hidden as appropriate. Should make things a lot easier.
Michael J

Thank you, yes that did work making the content div hidden.
http://www.iblob.info
http://www.iblobarcade.com

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |