Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As sLaks mentioned that does not help it does not help even if you change the src attribute of script tag. Instead what I suggest is in your first script file to store the entire code just make sure that you have module pattern like below </p> <pre><code>var yourModule = (function(){ function yourModule(){ ... } //your helper functions here function somehelper(){ .... } yourModule.prototype.someFun1 = function(){ .. }; yourModule.prototype.someFun2 = function(){ .. }; return yourModule; }()); </code></pre> <p>Just for an example I took this pattern. The advantage is if you want to disable the entire script as just changing script does not work make </p> <pre><code>var xyz= new yourModule(); // start using xyz // When you do not want yourModule anymore yourModule = function(){ return false; } or null; </code></pre> <p>will clear that function.</p> <p>Then load your script again using below code </p> <pre><code> var handleRequest = function( ) { //!! set up the handleRequest callback if(this.status != undefined) { /* do something with the status code here */ } if(this.readyState == 4) { var script = document.createElement("script") ; script.setAttribute("type","text/javascript") ; var text = document.createTextNode(this.responseText) ; script.appendChild(text) ; var head = document.getElementsByTagName("head")[0] ; head.insertBefore(script,head.firstChild) ; } } ; var request ; //!! supposing you have a way to get a working XHR Object //.. set the XHR Object request.open("GET",url,true) ; request.overrideMimeType("text/javascript") ; request.onreadystatechange = handleRequest ; request.send(null) ; </code></pre> <p>Script loading is answered many times in different questions by different gurus, here is solution what I like if you want to load it through AJAX (from : <a href="https://stackoverflow.com/questions/6946631/dynamically-creating-script-readystate-never-complete">dynamically creating script: readyState never &quot;complete&quot;</a>)</p>
    singulars
    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.
    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