Note that there are some explanatory texts on larger screens.

plurals
  1. POClosing <iframe> pages using javascript
    text
    copied!<p>I am a newbie to JavaScript. I have 9 <code>.php</code> pages but showing in a single php page using <code>&lt;iframe&gt;&lt;/iframe&gt;</code> like this:</p> <pre><code>&lt;iframe id="AlertMaintenance" style="border-style: none; border-color: inherit; border-width: 0px; width:55%; margin-left:10px;" src="total_dashboard.php" align="left"&gt;&lt;/iframe&gt; &lt;iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; width:47%; height:250px; margin-left:10px;" src="customer_orders.php" align="left"&gt;&lt;/iframe&gt; &lt;iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; width:50%; height:250px; margin-right:10px;" src="unpaid_invoice.php" align="right"&gt;&lt;/iframe&gt; &lt;iframe id="AlertMaintenance" style="border-style: none; border-color: inherit; border-width: 0px; width:47%; height:250px; margin-left:10px;" src="latest_po.php" align="left"&gt;&lt;/iframe&gt; &lt;iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; width:50%; height:250px; margin-right:10px;" src="latest_po_auth.php" align="right"&gt;&lt;/iframe&gt; &lt;iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; width:47%; height:240px; margin-left:10px;" src="latest_stock_status.php" align="left"&gt;&lt;/iframe&gt; &lt;iframe id="AlertMaintenance" style="border-style: none; border-color: inherit; border-width: 0px; width:50%; height:245px; margin-left:10px;" src="work_orders.php" align="right"&gt;&lt;/iframe&gt; &lt;iframe id="DelayReason" style="border-style: none; border-color: inherit; border-width: 0px; width:47%; height:250px; margin-left:10px" src="mrp_dashboard.php" align="left"&gt;&lt;/iframe&gt; </code></pre> <p>Now I want to have a close button for each button. If the user does not want to have any pages, he can close the page by clicking <strong>close</strong> or <code>X</code>. I don't know how to do it. </p> <p>Can somebody please help me?</p>
 

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