...

View Full Version : Open pop-up in same window



cadfan
05-23-2009, 08:36 PM
I would like to open a pop-up in the same window from which it was called. Is this possible?
Thanks all

Old Pedant
05-23-2009, 10:13 PM
You mean a "POP ON". A popup is by definition a new window. A popon is just a <DIV> (or similar) that is absolutely positioned on the page and which has a z-index that puts it in front of the rest of the page.

Here's a website where I did that, recently:
http://www.artsofsnohomish.org/index.asp

Look down the page for the 3 artists' names (e.g., "Janie Olsen") and click on one. There you go. A popon.

Look quick because that site gets changed to another show by Monday night.

Feel free to steal the code.

cadfan
05-24-2009, 11:50 AM
Must be making stupid mistake because i can't get it to function?

Old Pedant
05-24-2009, 08:00 PM
Show what you used/coded???

Can't guess from no information.

cadfan
05-24-2009, 11:40 PM
I have been trying to use without success the following:



<a href="#" onclick="return artist(this,2);"><b>My Name</b></a>

Old Pedant
05-25-2009, 08:54 PM
Please show how you *ADAPTED* my code to your page.

SURELY you wouldn't have 3 "artist" divs as I did. Why would you name your function artist( )???

If you didn't adapt the code, then you need to.

Try showing the FULL CODE.

cadfan
05-26-2009, 11:08 AM
Hi Old Pendant
I was not using your code as is. I just tried to you what line of code that i was using.

At the moment i am using the following:


<javascript language="javascript">
function fingers_crossed(){
lets_hope = window.open ("tester.html","lets_hope");
"height=210,width=425,resizable=0,menubar=0,toolbar=0,location=0,directories=0,
scrollbars=0,status=0,left=350,top390");
}
</script>


Finally,


<a href="javascript: self.close()">Click here to close</a>


I can now get the pop-uo to appear in the window from which it was called but it looks completely different from the ones you created?

Old Pedant
05-26-2009, 10:07 PM
Um...no...that *does* open a NEW WINDOW. It is not "in the same window from which it was called." But if that's good enough for you, just use that.

cadfan
05-28-2009, 02:32 PM
Hiya Old Pendant
I would prefer to do it as you have but some how i get lost along the way and was hoping that you just might show me how by altering the code i posted previously. Big thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum