SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    I LOVE THIS SITE ! ! ! DougD's Avatar
    Join Date
    May 2000
    Location
    San Diego, CA
    Posts
    463
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PopUp Window Opening Window Question???

    How do I do this?

    I created a PopUp window for my site. In that window I have a link with a target=_blank which opens a new window.

    How do I get that new window to open so it takes over the full screen, instead of a new small window?

    Thanks!

  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)
    target="_self"

    That will replace the current window. If you want to create a popup to be a new window that is the size of the screen that takes some javascript. Is that waht you want?
    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
    I LOVE THIS SITE ! ! ! DougD's Avatar
    Join Date
    May 2000
    Location
    San Diego, CA
    Posts
    463
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks... but my popup window is small, so that wouldn't accomplish what I need. I want the new window to open up to a full screen.

    Does anyone know where to find that javascript if that's what it needs?

    Thanks...

  4. #4
    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)
    Originally posted by DougD
    Thanks... but my popup window is small, so that wouldn't accomplish what I need. I want the new window to open up to a full screen.

    Does anyone know where to find that javascript if that's what it needs?

    Thanks...
    Yep...

    If you are doing it via a link try this

    In the head
    Code:
    <script language="javascript1.2">
    <!--
    function newWin(){
           var MyWindow=window.open ("WinURL","popupTitle", "toolbar=no,location=no,directories=no,status=no,
    menubar=no,scrollbars=no,resizable=no,width="+screen.width+",
    height="+screen.height"); 
        }
    -->
    </script>
    Call that with your link

    <a href="javascript:void(0)" onclick="newWin()">link</a>

    That will open up a popup window full screen.
    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.

  5. #5
    I LOVE THIS SITE ! ! ! DougD's Avatar
    Join Date
    May 2000
    Location
    San Diego, CA
    Posts
    463
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I am not asking the question right.

    Please go to my site. When it opens a popup window should appear. At the bottom of that window there is a link. When clicked on, I would like a new window to popup at full screen. It pops open at full screen in Netscape, but not in IE. I am not sure if the script you just gave me does that. I am not sure where to put the link.

    I appreciate the help...

  6. #6
    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)
    Originally posted by DougD
    I think I am not asking the question right.

    Please go to my site. When it opens a popup window should appear. At the bottom of that window there is a link. When clicked on, I would like a new window to popup at full screen. It pops open at full screen in Netscape, but not in IE. I am not sure if the script you just gave me does that. I am not sure where to put the link.

    I appreciate the help...

    ok When I click on this link in your popup

    Check-out our BEST DEALS Click Here

    You want the window that it opens up to be full screen right?

    Code:
    Check-out our BEST DEALS&nbsp;<a href="price.php?from=699&till=&title=Super_Bargains" target="_blank"><b>Click Here</b></a>
    Thats the current code in your popup window. Try this instead. That is your link.

    Code:
    Check-out our BEST DEALS&nbsp;<a href="javascript:void(0)" onclick="newWin()"><b>Click Here</b></a>
    In the head secion of your popup put this
    Code:
    <script language="javascript1.2">
    <!--
    function newWin(){
    	var w=screen.width
    	var h=screen.height
        var MyWindow=window.open("price.php?from=699&till=&title=Super_Bargains","","width="+w+",height="+h+",left=0,top=0")
    	  }
       -->
    </script>
    To explain what I am doing I am using a link to call a javascript function. This function is creating a window (full screen). Good luck
    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.

  7. #7
    I LOVE THIS SITE ! ! ! DougD's Avatar
    Join Date
    May 2000
    Location
    San Diego, CA
    Posts
    463
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot...

    I got it to do what I want, but I am having 2 problems still...

    I added some code to make the address bar and other bars appear. I am not sure if it is right, but it works.

    The 2 problems are...

    1) A new popup window appears on top of the new window.

    2) The bottom of my page does not appear.

    Any clues on those things???

    Thanks again...

  8. #8
    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)
    Originally posted by DougD
    [B]Thanks a lot...

    I got it to do what I want, but I am having 2 problems still...

    I added some code to make the address bar and other bars appear. I am not sure if it is right, but it works.

    The 2 problems are...

    1) A new popup window appears on top of the new window.
    First the popup window is happening because you have it opening every time that page is opened right. There are a couple of things you can do.
    You can use javascript
    1 - create a cookie on the first popup eg
    visited="y"
    this way when the page loads. Every time check the cookie to see if tha variable is set. If it isn't then show popup.
    You can do something similar with php and probably any other server sided language. But you will have to look into that in the server side forum. The bonus of using php is that it doesn't care what the user has. Javascript, if disabled on the client side, won't work.

    2) The bottom of my page does not appear.
    Ya I notices that...I am not sure why because my view source isn't working. So I can't see what is going on. I will try again tommorow. Hopefully someone else will be able to help you with that part before I logon tommorow
    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
  •