SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Eat, Sleep, *********! J. Pederson's Avatar
    Join Date
    Sep 2001
    Location
    Wisconsin
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pop-up Window Sizes

    This may be a stupid question... I am designing a site, it is for a newspaper, I have a splash page, where people choose their browser. The actual articles aren't seperated, the IE version uses inline frames to view articles, and I want the NS version to bring up a pop-up window, that meets the following requirements:

    - 400x400
    - no menus, just the title bar
    - it can be resizable
    - I want the scrollbars to be the equivalent of "auto"

    I would be extremely thankful if someone could either:
    - write me a script that could do this and/or tell me how to work with it.
    - or direct me to a place where I can get this resource.

    Thanx in advance! I would be quite thankful, I would be willing to give a link on my resource page to the person who answers (as thanks)! Thanx again!
    James Pederson - Web Design & Development
    phone: 608.243.7898
    e-mail: james@transparentacoustics.com
    websites: clear speaker box | website development madison

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    var newWin = window.open("url goes here","title goes here","resizable=yes, height=400px, width=400px,scrollbars=yes,toolbar=no,menubar=no,status=no, location=no");

    That should be it...
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Enthusiast dvdrip's Avatar
    Join Date
    Oct 2001
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do I actually do with the code?
    Where do I put it?
    Web Development:http://www.bluepixel.gr/
    Coming Soon:www.dvdrip.com

  4. #4
    Eat, Sleep, *********! J. Pederson's Avatar
    Join Date
    Sep 2001
    Location
    Wisconsin
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do I put that in the link tag itself??? I need more explanation... Thanx!
    James Pederson - Web Design & Development
    phone: 608.243.7898
    e-mail: james@transparentacoustics.com
    websites: clear speaker box | website development madison

  5. #5
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry about that guys

    Ok place that code in the <head> in a function so it easily reusable

    function openWin(){
    var newWin = window.open("url goes here","title goes here","resizable=yes, height=400px, width=400px,scrollbars=yes,toolbar=no,menubar=no,status=no, location=no");
    }

    anywhere in the body you can have a link call it

    <a href="javascript:void(0)" onclick="openWin()(">Link</a>

    edit No space in the javascript:void(0). all connect.

    <!----------------------------->
    You have to place your url and the title you wish for the window where I state in the above example. You can also make this more dynamic by passing values with the function call

    <a href="javascript:void(0)" onclick="openWin('http://www.google.com','test')>Link</a>

    Now just change the function to except variables

    function openWin(url,winTitle){
    var newWin = window.open(url,winTitle,"resizable=yes, height=400px, width=400px,scrollbars=yes,toolbar=no,menubar=no,status=no, location=no");
    }

    for more on javascript and function try going to
    www.w3schools.com

    Good luck and I hope that helps and I hope I didn't make any stupid little errors
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.


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
  •