Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 2.71 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-13-2002, 01:45 AM   PM User | #1
welo
New Coder

 
Join Date: Jun 2002
Location: Portland, Oregon
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
welo is an unknown quantity at this point
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
welo is offline   Reply With Quote
Old 06-13-2002, 01:48 AM   PM User | #2
Thejavaman1
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
Thejavaman1 is an unknown quantity at this point
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...
Thejavaman1 is offline   Reply With Quote
Old 06-13-2002, 01:49 AM   PM User | #3
Thejavaman1
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
Thejavaman1 is an unknown quantity at this point
also welo on an unrelated note, have you seen this yet? http://wtc2002.com/start.lasso
Thejavaman1 is offline   Reply With Quote
Old 06-13-2002, 02:12 AM   PM User | #4
welo
New Coder

 
Join Date: Jun 2002
Location: Portland, Oregon
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
welo is an unknown quantity at this point
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
welo is offline   Reply With Quote
Old 06-13-2002, 02:22 AM   PM User | #5
Thejavaman1
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
Thejavaman1 is an unknown quantity at this point
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...
Thejavaman1 is offline   Reply With Quote
Old 06-13-2002, 03:33 AM   PM User | #6
justame
Regular Coder

 
Join Date: Jun 2002
Posts: 676
Thanks: 1
Thanked 0 Times in 0 Posts
justame is on a distinguished road
Quote:
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...
justame is offline   Reply With Quote
Old 06-13-2002, 04:16 AM   PM User | #7
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
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.
__________________
jasonkarldavis.com

Last edited by jkd; 06-13-2002 at 04:18 AM..
jkd is offline   Reply With Quote
Old 06-13-2002, 08:27 AM   PM User | #8
welo
New Coder

 
Join Date: Jun 2002
Location: Portland, Oregon
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
welo is an unknown quantity at this point
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]
__________________
Llamasery Enlightened Internet Strategies
"Psychics will lead dogs to your body." --Alleged fortune cookie message

Last edited by welo; 06-13-2002 at 09:29 AM..
welo is offline   Reply With Quote
Old 06-13-2002, 06:12 PM   PM User | #9
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
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
jkd is offline   Reply With Quote
Old 06-13-2002, 06:45 PM   PM User | #10
welo
New Coder

 
Join Date: Jun 2002
Location: Portland, Oregon
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
welo is an unknown quantity at this point
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
welo is offline   Reply With Quote
Old 06-15-2002, 08:36 PM   PM User | #11
Quiet Storm
Regular Coder

 
Join Date: Jun 2002
Location: Beyond Lament
Posts: 424
Thanks: 0
Thanked 0 Times in 0 Posts
Quiet Storm is an unknown quantity at this point
Exclamation

Quote:
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.
__________________
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!·

Last edited by Quiet Storm; 06-15-2002 at 08:38 PM..
Quiet Storm is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:52 AM.


Advertisement
Log in to turn off these ads.