View Full Version : Information in pop-up window
davidwdf
10-30-2002, 03:37 PM
On my main page I have a list of names. When I click a name I want to open a popup with information about that person. I click another name I want that persons information to populate the same popup window and so on. By randomly picking names I want to see different infomation/html pages in the popup.
thanks in advance
David Ferguson
Simrey
10-30-2002, 05:10 PM
for example:
<a href="#" onClick="window.open('fred.html','mywin','width=300,height=300);return false">Fred</a><br>
<a href="#" onClick="window.open('alice.html','mywin','width=300,height=300);return false">Alice</a><br>
....etc
Keeping the same window name (mywin) means the Alice info will simply replace the Fred info rather than opening a new popup.
Simon
davidwdf
10-30-2002, 05:24 PM
Am I missing something? I copied your code and pasted it in my html document and I get an error in IE.
Simrey
10-30-2002, 05:47 PM
sorry -- yes, there should be a close quote after the height=300
that is ...height=300');return false... etc
Simon
davidwdf
10-30-2002, 05:59 PM
thanks, this is perfect!!!
davidwdf
10-30-2002, 06:28 PM
If I may impose on you one more time. What is needed to keep the popup on top?
thanks
Simrey
10-30-2002, 07:22 PM
I'm not too sure how consistently this works but if you put in the Fred.html files the tag
<body onLoad="self.focus()" onBlur="self.focus()">
it should keep the popup to the fore but may interfere with your ability to click on and load Alice. But you may have to live with the popup going briefly to the back when you click on the new link.
Anybody else have any thoughts?
Simon
RadarBob
10-30-2002, 07:41 PM
Originally posted by davidwdf
If I may impose on you one more time. What is needed to keep the popup on top?
thanks
="window.open('alice.html','mywin','width=300,height=300,
alwaysRaised=yes'); ..."
davidwdf
10-30-2002, 07:53 PM
I tried your fix RadarBob and can't seem to get it to work. If you have anymore ideas I'm open. If not don't rack your brain, I'll go another route.
You guys are great and want to say thanks for the effort.
David
RadarBob
10-30-2002, 09:35 PM
Originally posted by davidwdf
I tried your fix RadarBob and can't seem to get it to work. If you have anymore ideas I'm open. If not don't rack your brain, I'll go another route.
You guys are great and want to say thanks for the effort.
David
U no watt? I tried it too in IE5.5 and it didn't work. I just got this out of a javascript book but have not tried tu use it till now.
It's probably like "screenx" and "screeny"; which don't work in IE either. Thank u M$ for making life just a bit harder.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.