TheRoper
06-05-2004, 07:52 PM
hi all...
i am somewhat of a newbie, so here it goes... i have a simple table which contains various links in it (to audio/video files)... what i want to have happen is that by default, all DIVs (which contain the file sizes for their respective links) are invisible, then when the user onMouseOver's one of the links, it displays the file size of that file adjacent to the link (and all other DIVs remain invisible), then of course onMouseOut all DIVs are invisible... essentially, i want each link to show its own file size onMouseOver... i want to avoid calling a separate function for each link, so i think i may have to use an array??? but i don't know how to do that at all, or if it is even necessary, or what an array is, really... preferably a cross-browser solution, but it really only needs to work in IE...
thanks in advance,
TheRoper
here is the just of my coding so far, and i know it's way off:
<HTML>
<HEAD>
<TITLE>Audio/Video Files</TITLE>
<SCRIPT language="javascript" type="text/javascript"><!--
function audioIn() {
document.all['a1'].style.display = "block";
}
function audioOut() {
document.all['a1'].style.display = "none";
}
function videoIn() {
document.all['v1'].style.display = "block";
}
function videoOut() {
document.all['v1'].style.display = "none";
}
//--></SCRIPT>
</HEAD>
<BODY>
<a href="audiofile1.mp3" onMouseOver="audioIn()" onMouseOut="audioOut()">AUDIO LINK 1</a><DIV id="a1" style="display:none">420Kb</DIV>
<a href="audiofile2.mp3" onMouseOver="audioIn()" onMouseOut="audioOut()">AUDIO LINK 2</a><DIV id="a2" style="display:none">324Kb</DIV>
...
<a href="videofile1.mpg" onMouseOver="videoIn()" onMouseOut="videoOut()">VIDEO LINK 1</a><DIV id="v1" style="display:none">651Mb</DIV>
<a href="videofile2.mpg" onMouseOver="videoIn()" onMouseOut="videoOut()">VIDEO LINK 2</a><DIV id="v2" style="display:none">984Mb</DIV>
...
</BODY>
</HTML>
there are 13 audio files and 13 video files in total, i want each to display a seperate DIV...
thanks again...
TheRoper
i am somewhat of a newbie, so here it goes... i have a simple table which contains various links in it (to audio/video files)... what i want to have happen is that by default, all DIVs (which contain the file sizes for their respective links) are invisible, then when the user onMouseOver's one of the links, it displays the file size of that file adjacent to the link (and all other DIVs remain invisible), then of course onMouseOut all DIVs are invisible... essentially, i want each link to show its own file size onMouseOver... i want to avoid calling a separate function for each link, so i think i may have to use an array??? but i don't know how to do that at all, or if it is even necessary, or what an array is, really... preferably a cross-browser solution, but it really only needs to work in IE...
thanks in advance,
TheRoper
here is the just of my coding so far, and i know it's way off:
<HTML>
<HEAD>
<TITLE>Audio/Video Files</TITLE>
<SCRIPT language="javascript" type="text/javascript"><!--
function audioIn() {
document.all['a1'].style.display = "block";
}
function audioOut() {
document.all['a1'].style.display = "none";
}
function videoIn() {
document.all['v1'].style.display = "block";
}
function videoOut() {
document.all['v1'].style.display = "none";
}
//--></SCRIPT>
</HEAD>
<BODY>
<a href="audiofile1.mp3" onMouseOver="audioIn()" onMouseOut="audioOut()">AUDIO LINK 1</a><DIV id="a1" style="display:none">420Kb</DIV>
<a href="audiofile2.mp3" onMouseOver="audioIn()" onMouseOut="audioOut()">AUDIO LINK 2</a><DIV id="a2" style="display:none">324Kb</DIV>
...
<a href="videofile1.mpg" onMouseOver="videoIn()" onMouseOut="videoOut()">VIDEO LINK 1</a><DIV id="v1" style="display:none">651Mb</DIV>
<a href="videofile2.mpg" onMouseOver="videoIn()" onMouseOut="videoOut()">VIDEO LINK 2</a><DIV id="v2" style="display:none">984Mb</DIV>
...
</BODY>
</HTML>
there are 13 audio files and 13 video files in total, i want each to display a seperate DIV...
thanks again...
TheRoper