This topic is locked

Close Window

8/27/2007 4:22:00 PM
PHPRunner General questions
M
mmponline author

I've found this code on the *_fulltext.php page to close the window.

function DisplayCloseWindow()

{

echo "<br>";

echo "<hr size=1 noshade>";

echo "<a href=# onClick='window.close();return false;'>"."Close window"."</a>";

}


I've inserted it on the Visual Editor as an "Insert PHP Code Snippet" and it works fine.
However... On clicking the link, I first get a popup box (Internet Explorer) saying:
"The webpage you are viewing is trying to close the window. Do you want to close this window?" I then closes on yes.
Is there a way to avoid this step?

M
mmponline author 8/27/2007

Hajo
The topic mentioned is for after edit or change. I just want to close the window, as the link to the view page opens in a new window and then the "Close window" link needs to close the page.

X
xliner 8/27/2007

Hajo

The topic mentioned is for after edit or change. I just want to close the window, as the link to the view page opens in a new window and then the "Close window" link needs to close the page.


Stephan,
from my little understanding, I think, to change the following BOLDED things from FALSE to TRUE could be a way out ...
... echo "<a href=# onClick='window.close();return false;'>"."Close window"."</a>"; ...
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=20883&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' /> - Hajo

M
mmponline author 8/28/2007

Thought so as well. Tried that, but it did not work!

X
xliner 8/28/2007

Thought so as well. Tried that, but it did not work!


Stephan,
okay..., all well noted. No workaround at hand, can only recommend a musical remedy, here by letting you run an open OPEN WINDOW rather than a CLOSE WINDOW session, under www.deezer.com, here to listen to ELVIS on the "DON´T BE CRUEL" issue at hand.
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=20902&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' /> Hajo