Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP variable isn't working for height and width
    primarykey
    data
    text
    <pre><code>&lt;head&gt; &lt;script type="text/javascript"&gt; &lt;!-- var viewportwidth; var viewportheight; // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight if (typeof window.innerWidth != 'undefined') { viewportwidth = window.innerWidth, viewportheight = window.innerHeight } // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document) else if (typeof document.documentElement != 'undefined' &amp;&amp; typeof document.documentElement.clientWidth != 'undefined' &amp;&amp; document.documentElement.clientWidth != 0) { viewportwidth = document.documentElement.clientWidth, viewportheight = document.documentElement.clientHeight } // older versions of IE else { viewportwidth = document.getElementsByTagName('body')[0].clientWidth, viewportheight = document.getElementsByTagName('body')[0].clientHeight } //--&gt; &lt;/script&gt; &lt;?php $sizeh = '&lt;script type="text/javascript"&gt; document.write(viewportheight);&lt;/script&gt;'; $sizew = '&lt;script type="text/javascript"&gt; document.write(viewportwidth); &lt;/script&gt;'; ?&gt; &lt;/head&gt; //... &lt;?php &lt;iframe id="frame2" src="'.$row['url'].'" height="&lt;script type=\'text/javascript\'&gt;document.write(viewportheight);&lt;/script&gt;px" width="'.$sizew.'px" &gt;&lt;/iframe&gt; '; ?&gt; </code></pre> <p>// The above still can't handle changing the values of height and width</p> <p>Passing the above values from the script to iframe isn't working although printing the variables shows that they have values inside them</p> <pre><code>echo $sizeh; // shows ex:1093 echo $sizew; // shows ex:900 </code></pre> <p>Anyone please assist !!!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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