Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript replace document.write(ln) with jquery hotfix
    text
    copied!<p>A seriously flawed and retarded piece of software which goes by the name of "Joomla" is giving me its usual load of headaches.</p> <p><strong>Sample code</strong></p> <p>I have the following code:</p> <pre><code>&lt;!-- .... --&gt; &lt;div id="abc"&gt;&lt;!----&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; jQuery.get(url, function(data){ jQuery('#abc').html(data); }, 'data'); &lt;/script&gt; &lt;!-- .... --&gt; </code></pre> <p>And I get this code from that url:</p> <pre><code>&lt;!-- .... --&gt; &lt;script type="text/javascript"&gt; document.write('&lt;span'); // perhaps write classes document.write('&gt;'); // and the rest of the code &lt;/script&gt; &lt;!-- .... --&gt; </code></pre> <p><strong>The Issue</strong> </p> <p>Joomla is being <em>modern</em> by using <code>document.write</code> snipets. This completely obliterates any AJAX html, unless I disable/strip out javascript, which is a huge NO.</p> <p><strong>The Fix</strong></p> <p>I need to replace the text/code progressively to look like:</p> <pre><code>&lt;span id="ob1"&gt;&lt;!----&gt;&lt;/span&gt; &lt;script type="text/javascript"&gt; _ob_begin(1); _ob_write(1, '&lt;span'); // perhaps write classes _ob_write(1, '&gt;'); // and the rest of the code _ob_end(1); &lt;/script&gt; </code></pre> <p><strong>Clarification</strong></p> <p>Joomla-lovers, don't get anywhere near this topic. I feel like burning a joomla dev alive right now.</p> <p>The generated code (document.write) is strictly joomla's doing...no plugins, components or anything.</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