Changing a text file with the click of a link?
Ok, well this is actually more advanced than it seems, so I'll explain
On MSN Spaces, you can use a text file that's renamed as a .wmv file to play a file or a list of files. To do it, you just put the following code in a text file:
VB Code:
<ASX Version="3.0">
<title>NAME OF MUSIC LIST</title>
<entry>
<title>NAME OF SONG</title>
<author>NAME OF ARTIST</author>
<Ref href="THE URL OF THE MUSIC FILE"/>
</entry>
</asx>
So anyways, what I want to do, is set up a series of links. What these links will do is change the code inside this text file, so the values for the name of the list, name of the song, name of the artist, and url of the music file.
So for example, I click on a link named Green Day - american idiot, and the code in the file changes to:
VB Code:
<ASX Version="3.0">
<title>Green Day</title>
<entry>
<title>American Idiot</title>
<author>Green Day</author>
<Ref href="http://www.server.com/greenday-americanidiot.mp3"/>
</entry>
</asx>
So is there any way I can do this with html?
Re: Changing a text file with the click of a link?
No. HTML is a markup language. You can't do it with JavaScript either.
You can do it with CGI or other server-side technologies, but only for files on the server, not for files on your computer.
Re: Changing a text file with the click of a link?
Well, that's what I meant.. but still, cant do it with html, then there's no point for me :P Thanks :thumb:
Re: Changing a text file with the click of a link?
If you will use a script (such as VBS / JS) inside the HTML, the data might be seen by other people. if you use sever side application, no one can get any of your data.