Results 1 to 2 of 2

Thread: small browser window

  1. #1
    Join Date
    May 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default small browser window

    hello,

    i am looking for a scipt that will allow me to open a small browser window in the middle of the pages. better yet, can i give coordinates?

    many thnx in advance

    i.e: http://www.306090.org

    ash

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Weird script.

    Popups are usually blocked by popup blockers... it lets you load this via a link if it doesn't load in the first place if you have a popup blocker.

    Just google for a popup script.

    Not sure about coordinates... that's a bit more complex.




    Just use mozilla firefox (install if you don't have it; it's worth it) and look at the source. It'll block the popup and let you see what's going on.
    The function looks pretty simple.
    The coordinates are part of that script... just parameters in the function.


    Actually... here:
    Code:
    function popWindow(urlpass,windowNumber,imageWidth,imageHeight,posLeft,posTop) {  
    	newWindow = window.open(urlpass, windowNumber, "width="+imageWidth+", height="+imageHeight+", scrollbars=no, toolbar=no, resizable=no, left="+posLeft+", top="+posTop);
    	newWindow.focus();
    	self.close();
    }
    that's what does it. self.close cloes the big window, newwindow.focus makes it make the popup active, and the window.open just opens the popup.
    It's held in a function, so the url, windowNumber, image Width, etc can be passed to it via
    Code:
    <BODY [...] ONLOAD="popWindow('main.shtml','1','390','270','226','200');">
    Last edited by djr33; 06-30-2006 at 10:53 PM.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •