Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Portland, Oregon
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Required popups - Just for the new board!

    Oooooooo boy! A vigin forum! (rubbing hands together )

    Here's a question: I've been considering how to make a page supposed to render in a popup (a slideshow, for instance), stay in the popup - e.g. when you use the url directly you still get the popup.

    It's a tough issue. Theoretically you could do something akin to frame forcing. I even thought of causing the page to open a browser to open the popup then close the parent window, though if a search engine has the page logged, people will have their browsers inadvertantly closed.

    Ideas?
    Llamasery Enlightened Internet Strategies
    "Psychics will lead dogs to your body." --Alleged fortune cookie message

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    Stuck in the inner reaches of my mind
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you deflowered it!

    parent.location.go(-1);
    window.focus();

    would be my choice. I once was going to do something like this (had a working example until I formated), that makes it so your page is on top, but once they are done with it, they can close it and continue browsing...

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Stuck in the inner reaches of my mind
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    also welo on an unrelated note, have you seen this yet? http://wtc2002.com/start.lasso

  • #4
    New Coder
    Join Date
    Jun 2002
    Location
    Portland, Oregon
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'll try it out Andrew, thanks.

    Hadn't seen that WTC proposal yet. Looks like another one to add to the new Futures photo gallery section (which also will be linked from a corresponding page in the History section (almost ready for launch - like by tomorrow).

    However, long as you brought it up I'm preparing to align CWTC for endorsement of This Project, which has the best feel of any WTC proposal I've seen thus far. I'll letcha know.
    Llamasery Enlightened Internet Strategies
    "Psychics will lead dogs to your body." --Alleged fortune cookie message

  • #5
    New Coder
    Join Date
    Jun 2002
    Location
    Stuck in the inner reaches of my mind
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    that would be increadably cool. And really big, wow, I know they are starting something on site 7 right now. There was an article in either the local paper (san diego union tribune) or the WSJ about their decission process. They are susposedly going to have the final project decided by december...

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Originally posted by Thejavaman1
    http://wtc2002.com/start.lasso
    /me went to just a look® @ it??? n' ummm sorrry dont have over 5 mins to wait via the ol' 28.8 dialup...lol...

  • #7
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Perhaps a solution?

    <script type="text/javascript">
    window.onload = function() {
    var newWin;
    if (typeof window.popped == 'undefined' || !window.popped) {
    newWin = window.open('yourpopupstuff');
    newWin.popped = true;

    window.location.replace('http://www.google.com');
    // maybe history.back() would suffice
    }
    }
    </script>

    I basically check to see if you haven't assigned the popup window a boolean, popped. If undefined or doesn't evaluate to true, open the popup code you want, giving the new window the popped boolean. And then, to preserve the main window, replace the location with google's.
    Last edited by jkd; 06-13-2002 at 05:18 AM.

  • #8
    New Coder
    Join Date
    Jun 2002
    Location
    Portland, Oregon
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks jkd. That's more what I had in mind. Lemme try it out!

    Edit:
    Okay, that worked perfectly. For instance, Click Here.

    Code:
    	<script type="text/javascript"><!--
    window.onload = function() { 
    var PopUpUrl="http://commemoratewtc.com/history/artwork/ideogram01.html"
    var newWin; 
    if (typeof window.popped == 'undefined' || !window.popped) { 
    newWin = window.open(PopUpUrl,"","width=472,height=422,toolbar=no,location=0,directories=0,status=0,scrollbars=no,menubar=0,resizable=0"); 
    newWin.popped = true; 
    window.location.replace('http://commemoratewtc.com/history/artwork/ideogram.php'); 
    } 
    } 
    // -->
    	</script>


    [edit#2]

    Okay, just hit a minor glitch. If I open the popup from the page I get two popups, one of which contains the page I launch from. Go Here and click on the image to launch the popup. You'll see what I mean. Pretty close though. I suppose I could just target the page running in the popup, though it'll reload the existing page unnecessarily. Ideas?

    [/edit#2]
    Last edited by welo; 06-13-2002 at 10:29 AM.
    Llamasery Enlightened Internet Strategies
    "Psychics will lead dogs to your body." --Alleged fortune cookie message

  • #9
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Whereever your PopUp() function is located that originally opens the popup, add at the end:

    WinPop.popped = true;

    I didn't have time to look through all of your source code, but a:
    javascript:PopUp

    In the location bar gave me:
    [code]
    function PopUp() {
    var ScreenWidth = window.screen.width;
    var ScreenHeight = window.screen.height;
    var movefromedge = 0;
    placementx = (ScreenWidth / 2) - ((670) / 2);
    placementy = (ScreenHeight / 2) - ((490) / 2);
    var PopUpUrl = "ideogram01.html"; WinPop = window.open(PopUpUrl, "", "width=472,height=422,toolbar=no,location=0,directories=0,status=0,scrollbars=no,menubar=0,resizable =0,left=" + placementx + ",top=" + placementy + ",screenX=" + placementx + ",screenY=" + placementy + ",");
    }

    You would add that WinPop.popped = true right before the last }.

  • #10
    New Coder
    Join Date
    Jun 2002
    Location
    Portland, Oregon
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That's it! hehe

    One lousy line I missed. Thanks Jason!

    (btw, this officially makes you a CWTC coder in the contributors list; will email you in a minute )
    Llamasery Enlightened Internet Strategies
    "Psychics will lead dogs to your body." --Alleged fortune cookie message

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Location
    Beyond Lament
    Posts
    424
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    Originally posted by welo
    I even thought of causing the page to open a browser to open the popup then close the parent window, though if a search engine has the page logged, people will have their browsers inadvertantly closed.

    Ideas?
    I've been trying to do something like that on my site! Although I'm trying to use cookies to save the referrer URL so as to open that page again, once the surfer leaves my site... (haven't figured out how, yet)

    Wow, cool! Someone thinks the same.
    Last edited by Quiet Storm; 06-15-2002 at 09:38 PM.
    Quíet Storm Designs ~ Art is not what you see, but what you make others see.
    · the Storms· || ·Ultraviolent Winter· || ·Was Einstein Wrong?· || ·It´s About Time!·


  •  

    Posting Permissions

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