Web Analytics Made Easy -
StatCounter Required popups - Just for the new board! - CodingForum

Announcement

Collapse
No announcement yet.

Required popups - Just for the new board!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    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...
    Projects I work on: http://www.devnet.info, http://www.mybboard.com
    Forums I visit: http://www.nemesis.thecoldshop.com, http://www.the-pit.net, http://www.hardforum.com, http://www.genmay.com

    Comment


    • #3
      also welo on an unrelated note, have you seen this yet? http://wtc2002.com/start.lasso
      Projects I work on: http://www.devnet.info, http://www.mybboard.com
      Forums I visit: http://www.nemesis.thecoldshop.com, http://www.the-pit.net, http://www.hardforum.com, http://www.genmay.com

      Comment


      • #4
        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

        Comment


        • #5
          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...
          Projects I work on: http://www.devnet.info, http://www.mybboard.com
          Forums I visit: http://www.nemesis.thecoldshop.com, http://www.the-pit.net, http://www.hardforum.com, http://www.genmay.com

          Comment


          • #6
            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...
            The New JustaBuster Version 2.0 OR JustaBusta Lite V2.0
            ...just a special® thanx kinda hugs to jkd n' nex ...:O)))

            CommemorateWTC.com --Please lend your support

            Comment


            • #7
              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; Jun 12, 2002, 11:18 PM.
              jasonkarldavis.com

              Comment


              • #8
                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; Jun 13, 2002, 04:29 AM.
                Llamasery Enlightened Internet Strategies
                "Psychics will lead dogs to your body." --Alleged fortune cookie message

                Comment


                • #9
                  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 }.
                  jasonkarldavis.com

                  Comment


                  • #10
                    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

                    Comment


                    • #11
                      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; Jun 15, 2002, 03: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!·

                      Comment

                      Working...
                      X