|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
#1
|
|||
|
|||
|
Hi,
I'm using Popup Windows ( http://www.dynamicdrive.com/dynamicindex11/abox2.htm ), and I need to close a window generated by it within the window itself. I've tried to use hidebox(ID), but it only works on a opened popup. Can anyone help me? Thanks. Regards, Eric Saboia |
|
#2
|
||||
|
||||
|
Why would you want to close an unopened pop up?
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#3
|
|||
|
|||
|
I should right opener (parent document) and not opened. Im sorry.
|
|
#4
|
||||
|
||||
|
I'm still not clear on where you are trying to do what from.
I think the what is - close a pop up pseudo window created by this script. I think where is from some other window other than the one in which the pop up pseudo window created by this script resides. Cross window scripting is fairly easy but, can get tricky when windows are opened and closed and/or reused after being initially created. The basic idea is that anything on the child window can be accessed from the opener if it was opened using javascript and assigned a variable at that time: Code:
var mynewwin=window.open('some.htm');
Code:
mynewwin.document.title Code:
opener.document.title
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#5
|
|||
|
|||
|
index.php:
new popUp(0, 0, 773, 385, unique, "<iframe src='"+acao+"_prod.php?id_prod="+id_prod+"&id_div="+unique+"' name='main' width='100%' height='100%' marginheight='1' scrolling='Auto' frameborder='0' id='main'></iframe>", "white", "black", "bold 10pt sans-serif", "Informações do produto", "navy", "white", "#dddddd", "gray", "black", true, false, false, true, false); I want to close (or hide) the popUP using a link inside the acao_prod.php (iframe link thats loaded inside the pseudo window). Just like the [x] on titlebar of pseudo window. Sorry for the bad english.. |
|
#6
|
||||
|
||||
|
That's a little different. You are not dealing with an opener or with a child window created as I indicated. You can still do it. What you have is a parent page:
index.php and a child iframe: Code:
<iframe src='"+acao+"_prod.php?id_prod="+id_prod+"&id_div="+unique+"' name='main' width='100%' height='100%' marginheight='1' scrolling='Auto' frameborder='0' id='main'></iframe> acao_prod.php on acao_prod.php things on index.php would be parent.object so, from my previous example, index.php's title would be from acao_prod.php: parent.document.title and what you seem to be after would be: parent.hidebox(ID)
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#7
|
|||
|
|||
|
Thanks!!
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|