Why my "PURE JAVASCRIPT BASED" offline file is not supporting "onload" events? -


i have offline "htm" file on pc use test html codes. html editor. compiles html codes. have problem it. supports kinds of css , javascript , javascript based libraries jquery not support events like- "onload, $(document).ready()" don't know why? have tried many things able nothing.

so see source code of editor-

<html>  <script type="text/javascript">   function showresult()   {     my_window = window.open("about:blank", "mywindow1");     my_window.document.write(x);     if(my_window.document.title=="")     {       my_window.document.title="no title specified"     }   }  </script>  <body>    <textarea style="height:400px;width:750px;overflow:auto;" onblur="x=this.value">    </textarea><br />    <button onclick="showresult()">see result!</button>  </body> </html> 

please tell me mistake have done? why me file not supporting "onload" events?

you're executing code within context of page loaded.

systems jsfiddle handle dynamically generating page , loading iframe.

you'd need sort of server-side scripting this. i'd advise installing local webserver (i.e. wampserver).


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -