calnastic
07-09-2011, 05:05 PM
Hi I am a new user to JS, and I have a problem here:
I have some JS code to work on a data set with file name "data.txt" in the header section of an HTML page.
<script type="text/javascript" src="data.txt"></script>
What I am trying to do is to ask a user to input a different file name, then update the file name in the <script> tag, for example, to
<script type="text/javascript" src="new_data.txt"></script>
But I don't know how to update the file name. Any help will be appreciated.
I have some JS code to work on a data set with file name "data.txt" in the header section of an HTML page.
<script type="text/javascript" src="data.txt"></script>
What I am trying to do is to ask a user to input a different file name, then update the file name in the <script> tag, for example, to
<script type="text/javascript" src="new_data.txt"></script>
But I don't know how to update the file name. Any help will be appreciated.