tags:

views:

30

answers:

3

Hi - I have this script on my html page:

<script language='javascript'>parent.resizeTo(550,510);</script>

I'd like to add to it so it positions the window in the middle of the screen. Also, I want to remove the address and tool bars (I've managed to hide the scrollbars by using body{overflow:hidden;}).

I know how to do this using JS upon opening a new window from the browser but this needs to work from clicking a link on a PDF.

Does anyone have any suggestions? Thank you!

+1  A: 

You can't remove address bars, etc. from the user's browser window (even if the user is only you) unless you create a new window object. And the trend is toward removing more and more of your ability to "customize" such popup windows, for security reasons.

This is actually a feature, not a bug. Think about it.

Robusto
A: 

If you're opening a browser window from a separate application, the page starts off its life with a completely-decorated browser window. There's no way to make those decorations go away after the page is loaded.

Pointy
Hmmm..makes sense. Thanks for your answers :-)
nWight
A: 

While I seriously doubt the justification of your desires the way to do it is to somehow open a window. That means that your pdf links to a page that as its action will open a window with an url that has the actual content. The pdf links to a page that is basically a redirector. You give the final URL as a parameter and launch it. Of course you need to disable the popup blocker for this to work, but you should not even consider doing this on a public (no browser control) website anyway. You also might want to add to the redirector page a button that the user can click to open the page if it was blocked by the popup blocker.

Paul de Vrieze