Re: Specify new window size
From: Pete (pete_at_SPAMOFFpw9.co.uk)
Date: 06/29/04
- Next message: Jens Peter Karlsen [FP MVP]: "Re: FP2003 and Popup Windows"
- Previous message: molly: "Re: table of content won't stick"
- In reply to: Stefan B Rusynko: "Re: Specify new window size"
- Next in thread: Stefan B Rusynko: "Re: Specify new window size"
- Reply: Stefan B Rusynko: "Re: Specify new window size"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 29 Jun 2004 17:48:13 +0100
Thanks for that, I'll give that a go later.
Will this mean that new windows opened will be recognised as a popup which
could be blocked by a firewall?
--
Pete
"Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message
news:eRQVfIdXEHA.1152@TK2MSFTNGP09.phx.gbl...
> This script comes close for most browsers
> Invoked by passing Variables: content,title,setW,setH
> (setW & setH are optional to change the default popup size from var wide=
600, high= 400)
>
> onclick="showPopUp('path/page.htm','Window Title Text');return false;"
>
> // POPUP WINDOWS
> function showPopUp(content,title,setW,setH) {
> if (setW > 0 && setH > 0) { var wide= setW, high= setH; } else { var wide=
600, high= 400; };
> var x = 0, y = 0;
> var agt=navigator.userAgent.toLowerCase();
> var is_aol = (agt.indexOf("aol") != -1); browsername=navigator.appName;
> if (browsername.indexOf("Microsoft")!=-1) {
> var xMax = document.body.clientWidth, yMax = document.body.clientHeight;
> var x = window.screenTop, y = window.screenLeft;
> } else if (browsername.indexOf("Netscape")!=-1) {
> var xMax = window.innerWidth, yMax = window.innerHeight;
> var x = window.screenX, y = window.screenY + 20;
> } else { var xMax = wide, yMax = high; var x = 0, y = 0;} ;
> var xOffset = x + (xMax - wide)/2, yOffset = y + (yMax - high)/2;
> if (is_aol) {var xOffset = 0, yOffset = 0 };
>
window.open(content,null,"scrollbars=1,resizable=1,width="+wide+",height="+h
igh+",screenX="+xOffset+",screenY="+yOffset+",left="+xOf
> fset+",top="+yOffset+""); };
>
> --
>
> _____________________________________________
> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> "Warning - Using the F1 Key will not break anything!" (-;
> To find the best Newsgroup for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
> _____________________________________________
>
>
> "MD Websunlimited" <none@none.com> wrote in message
news:e1enf%23cXEHA.1656@TK2MSFTNGP09.phx.gbl...
> | Hi Pete,
> |
> | I don't know of any popup window code that opens in a size relative to
the users screen resolution but it is possible to do.
> |
> | You may wish to take a look at J-Bots Pop-up windows / Window Close
components.
> |
http://www.websunlimited.com/order/Product/General/popup_window_component.htm
> |
> | --
> | Mike -- FrontPage MVP '97-'02
> | http://www.websunlimited.com
> | Need to manage your code snippets in FP? Take a look at CodeView!
> | http://www.websunlimited.com/order/Product/CodeView/codeview.htm
> | FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible
> |
> |
> | "Pete" <pete@SPAMOFFpw9.co.uk> wrote in message
news:Z6aEc.348$r74.98@fe1.news.blueyonder.co.uk...
> | > Is there an easy way to specify what size a new window will be when
opened.
> | > Ideally, it would be best to be able to open the window where the size
would
> | > be relative to a users screen resolution/size.
> | > I use Spawn from Jimco AddIns which allows this for images but not for
other
> | > web pages.
> | > Any ideas?
> | > Thanks.
> | >
> | > Pete
> | >
> | >
> | >
> |
> |
>
>
- Next message: Jens Peter Karlsen [FP MVP]: "Re: FP2003 and Popup Windows"
- Previous message: molly: "Re: table of content won't stick"
- In reply to: Stefan B Rusynko: "Re: Specify new window size"
- Next in thread: Stefan B Rusynko: "Re: Specify new window size"
- Reply: Stefan B Rusynko: "Re: Specify new window size"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|