Re: Specify new window size

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Pete (pete_at_SPAMOFFpw9.co.uk)
Date: 06/29/04


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
> | >
> | >
> | >
> |
> |
>
>


Relevant Pages

  • Re: Iceweasel freezes and iceape vulnerabilities and instability
    ... popup is fixed in place within the browser window, ... the browser is doing its job; it is just possible to do some really ... Funny you mention this -- I don't think this is due to malicious code, ...
    (Debian-User)
  • RE: [PHP] Conditional popup driven from server-side
    ... otherwise display normal browser page. ... if there aren't errors then popup a modal ... window and start processing while displaying ... server, and then get the server to close it when done. ...
    (php.general)
  • Re: Popup window
    ... thumbnails and when I click one of them a popup opens with a larger ... Fine so far but when I click the next thumbnail the popup disappears ... var ox = mw; ... // Focus on current window ...
    (comp.lang.javascript)
  • Re: Avira AntiVir (free version) - Is this now adware?
    ... When I went to manually update, got an ad. Got back to the host this morning and saw another popup window with their ad. ... It could be wonderful cake but not if you occasionally get a turd smooshed into your face. ...
    (alt.comp.anti-virus)
  • Re: Avira AntiVir (free version) - Is this now adware?
    ... Seemed okay but it seems plagued with ads trying to get the user to buy into their premium version. ... When I went to manually update, got an ad. Got back to the host this morning and saw another popup window with their ad. ... It could be wonderful cake but not if you occasionally get a turd smooshed into your face. ...
    (alt.comp.anti-virus)