I am new to javascript and want to load the file without having to click on the load file button
I am using the following script and I want the text to be loaded aut
Respond to the document's ready event:
ready
$(document).ready( loadFileAsText );
If you don't want to use jQuery for simple compatibility with multiple browsers, then see this answer: pure JavaScript equivalent to jQuery's $.ready() how to call a function when the page/dom is ready for it