I would like to retrieve the contents of different external JS files with a textbox or drop-down selection.
Is this possible?
Where 'Jan.js' ... 'Dec.js' would be stand alone external files.Code:<select id="SBox" onChange="LoadJSinfo(this.value)"> <option value="">Choose Month</option> <option value="Jan.js">Jan</option> // ... <option value="Dec.js">Dec<option> </select>
I am stuck on how to create the function 'LoadJSinfo(filename)'.
My initial thoughts were:
But obviously, that doesn't work.Code:function LoadJSinfo(filename) { <script type="text/javascript" src=filename></script> }
Is there a way to load the external file contents after the page has been displayed?


Reply With Quote


Bookmarks