Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript PHP document.write
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/7627519/where-is-the-js-file-in-this-code-and-why-are-they-calling-it-this-way">Where is the .JS file in this code? And why are they calling it this way?</a> </p> </blockquote> <p>This is my JavaScript code. <strong>showcode.php</strong></p> <pre><code>&lt;script type="text/javascript" charset="utf-8"&gt;(function(){ var a="publisher-121"; var n="top"; var z="45"; var h="125"; var w="125"; var nofollow="no"; var e=document.getElementsByTagName("script")[0]; var d=document.createElement("script"); d.src=('https:'==document.location.protocol ? 'https://' : 'http://') +"server.com/adcode.php?a="+a+"&amp;h="+h+"&amp;w="+w+"&amp;n="+n+"&amp;z="+z; d.async = true; d.defer = true; d.type="text/javascript"; e.parentNode.insertBefore(d,e); })();&lt;/script&gt; </code></pre> <p>As you can see, the URL points to <a href="http://server.com/adcode.php?a=publisher-121&amp;n=top&amp;z=45&amp;w=125&amp;h=125" rel="nofollow noreferrer">http://server.com/adcode.php?a=publisher-121&amp;n=top&amp;z=45&amp;w=125&amp;h=125</a></p> <p>All this page has is the following: (<strong>adcode.php</strong>)</p> <pre><code> &lt;?php echo "document.write('&lt;div id=\"ha_adblock ".$a."_".$z."\" class=\"ha_adblock".$a."_".$z."\" style=\"width:".$h."px;height:".$w."px;background:#eee;text-align:center;cursor:pointer\" onClick=\"window.location.href=\'click.php?a=".$a."&amp;z=".$z."&amp;g=http://refererurl.com/;\'return false;\"&gt;&lt;a href=\"http://refererurl.com/\" onClick=\"window.location.href=\'click.php?a=".$a."&amp;z=".$z."&amp;g=http://refererurl.com/;\'return false;\" style=\"color:#333;font-weight:bold\"&gt;advert&lt;/a&gt;&lt;/div&gt;');"; ?&gt; </code></pre> <p>However - the page just appears blank. Firebug shows that my code has been loaded and executed fine with no errors. If I just spit out the code above (document.write) inside a script tag it works - the PHP call back does not seem to work?</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.
 

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