A
Alric Knebel
I'm relatively new to HTML, and my coding at present is very fundamental. I
have a page on my website on which ten different buttons link to an MP3.
But the MP3 could change frequently, almost daily. Now, I've been looking
at CSS, but so far I haven't incorporated a single CSS into any of my pages.
Maybe I'm jumping to the wrong conclusion, but I was thinking that CSS is
the answer to my problem. Follow me a moment, and some of you guys probably
already have a solution to this.
Here's the deal. I have a short MP3. Rarely will they be more than a
minute long. I have a jpeg button you click on to activate the MP3. Now,
tomorrow, I might want to change that MP3. So far, with my limited
knowledge of HTML, I'll have to open the code in an editor and change the
name of the MP3, save the changed HTML file, then upload it to the site,
where the new code will overwrite the old code. This hardcoding is a clunky
way to do this. I know there's got to be a better way to do this than the
way I just described. Here's what I was thinking.
I was thinking that I'd have a generic name for the link in the HTML. For
example, I'll reference the MP3 in the HTML code as simply, say,
"current_sound.mp3." There are several buttons on this page with a
different sound associated with each button; you can imagine that this could
get very awkward and take up a lot of time if I wished for my site to stay
current. As in CSS, somewhere in the hardcoded page would be a reference to
some external file that would assign a value to "current_sound.mp3". The
external text file might have a line that says,
"current_sound.mp3"="C-SPAN-100504.mp3".
I would like to know two things. First, is what I'm suggesting possible?
Second, if it's possible, can you give me a hint as to what direction to go
in? What code am I looking for, what's it called?
In conclusion, I haven't worked yet in JavaSript, but I was thinking that
I'd create a small script that would list on one side the hardcoded filename
and in another column the actual file associated with each file name, which
would then write them all to the text file, then upload that text file to
the website, where the HTML page would access the information.
I hope I made this clear. Thanks for any help. For clarity, I've included
the page I'm talking about in the link below.
Alric Knebel
http://www.ironeyefortress.com/C-SPAN_loon.html
have a page on my website on which ten different buttons link to an MP3.
But the MP3 could change frequently, almost daily. Now, I've been looking
at CSS, but so far I haven't incorporated a single CSS into any of my pages.
Maybe I'm jumping to the wrong conclusion, but I was thinking that CSS is
the answer to my problem. Follow me a moment, and some of you guys probably
already have a solution to this.
Here's the deal. I have a short MP3. Rarely will they be more than a
minute long. I have a jpeg button you click on to activate the MP3. Now,
tomorrow, I might want to change that MP3. So far, with my limited
knowledge of HTML, I'll have to open the code in an editor and change the
name of the MP3, save the changed HTML file, then upload it to the site,
where the new code will overwrite the old code. This hardcoding is a clunky
way to do this. I know there's got to be a better way to do this than the
way I just described. Here's what I was thinking.
I was thinking that I'd have a generic name for the link in the HTML. For
example, I'll reference the MP3 in the HTML code as simply, say,
"current_sound.mp3." There are several buttons on this page with a
different sound associated with each button; you can imagine that this could
get very awkward and take up a lot of time if I wished for my site to stay
current. As in CSS, somewhere in the hardcoded page would be a reference to
some external file that would assign a value to "current_sound.mp3". The
external text file might have a line that says,
"current_sound.mp3"="C-SPAN-100504.mp3".
I would like to know two things. First, is what I'm suggesting possible?
Second, if it's possible, can you give me a hint as to what direction to go
in? What code am I looking for, what's it called?
In conclusion, I haven't worked yet in JavaSript, but I was thinking that
I'd create a small script that would list on one side the hardcoded filename
and in another column the actual file associated with each file name, which
would then write them all to the text file, then upload that text file to
the website, where the HTML page would access the information.
I hope I made this clear. Thanks for any help. For clarity, I've included
the page I'm talking about in the link below.
Alric Knebel
http://www.ironeyefortress.com/C-SPAN_loon.html