Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript/PHP popup page problem
    text
    copied!<p>I have a program in PHP that allows user to pop in a message, for confirmation from user. As seen below is the link i used.</p> <p>From <strong>inbox.php</strong>:</p> <pre><code>echo "&lt;a href='inbox.php' onclick=\"popup('acknowledge.php?id=$id')\"&gt;&lt;font size=1px color=maroon&gt;acknowledge&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;"; </code></pre> <p>From <strong>acknowledge.php</strong>:</p> <pre><code>if ($_POST['no']) { header("location: inbox.php"); } ?&gt; &lt;body bgcolor=skyblue&gt; &lt;center&gt;&lt;form name=form1 method=post&gt; &lt;b&gt;&lt;u&gt; Acknowledge Message &lt;/u&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt; Are you sure yout want to acknowledge this message?&lt;br&gt;&lt;br&gt; &lt;input type=button name=yes value="Yes"&gt; &amp;nbsp; &lt;input type=submit name="no" value="No"&gt; &lt;/form&gt; &lt;/center&gt; &lt;/body&gt; </code></pre> <p>The problem is, everytime i click "no", to go back from previous page. It sets the page size the same as the popup page. It becomes smaller too. What's the problem? Answers are very much appreciated.</p> <p>Here is the code for popup():</p> <pre><code>&lt;script language="JavaScript" type="text/JavaScript"&gt; &lt;!-- function popup(url) { var width = 500; var height = 135; var left = (screen.width - width)/2; var top = (screen.height - height)/2; var params = 'width='+width+', height='+height; params += ', top='+top+', left='+left; params += ', directories=no'; params += ', location=no'; params += ', menubar=no'; params += ', resizable=no'; params += ', scrollbars=no'; params += ', status=no'; params += ', toolbar=no'; newwin=window.open(url,'windowname5', params); if (window.focus) {newwin.focus()} return false; } // --&gt; &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload