Magoo
12-26-2003, 02:19 PM
Hi,
Below is some html which fades in/out text when buttons are clicked. What I wish to do is fade-in different text strings at different intervals without clicking buttons(i.e one after the other) but haven't a clue how to call the FadeIn/FadeOut functions for specific text strings or to implement delays. I know it's gotta be something simple but I can only get the function to run via an Event Handler.
The main code is from MSDN but their literature is for atomic physicists and not rocket scientists like me, anyone help??
<HTML>
<HEAD>
<TITLE>Jim's Place</TITLE>
<SCRIPT>
<!--
function fadeOut(obj) {
obj.style.filter="blendTrans(duration=1)";
// Make sure filter is not playing.
if ((obj.visibility != "hidden") && (obj.filters.blendTrans.status != 2)) {
obj.filters.blendTrans.Apply();
obj.style.visibility="hidden";
obj.filters.blendTrans.Play();
}
}
function fadeIn(obj) {
obj.style.filter="blendTrans(duration=1)";
// Make sure filter is not playing.
if ((obj.visibility != "visible") && (obj.filters.blendTrans.status != 2)) {
obj.filters.blendTrans.Apply();
obj.style.visibility="visible";
obj.filters.blendTrans.Play();
}
}
-->
</SCRIPT>
</HEAD>
<body style="filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#ff00ff', startColorstr='#800000', gradientType='0');">
<div ID="oDiv" STYLE="visibility:hidden;width:1024; color:#FFFF00; font-family:Lucida handwriting;font-size:xx-large;text-align:center;">M A C ' S P L A C E !</div>
<BUTTON onclick="fadeOut(oDiv)" STYLE="background-color: blue; color: white">Fade Text Out</BUTTON>
<BUTTON onclick="fadeIn(oDiv)" STYLE="background-color: blue; color: white">Fade Text In</BUTTON>
</BODY>
</HTML>
Below is some html which fades in/out text when buttons are clicked. What I wish to do is fade-in different text strings at different intervals without clicking buttons(i.e one after the other) but haven't a clue how to call the FadeIn/FadeOut functions for specific text strings or to implement delays. I know it's gotta be something simple but I can only get the function to run via an Event Handler.
The main code is from MSDN but their literature is for atomic physicists and not rocket scientists like me, anyone help??
<HTML>
<HEAD>
<TITLE>Jim's Place</TITLE>
<SCRIPT>
<!--
function fadeOut(obj) {
obj.style.filter="blendTrans(duration=1)";
// Make sure filter is not playing.
if ((obj.visibility != "hidden") && (obj.filters.blendTrans.status != 2)) {
obj.filters.blendTrans.Apply();
obj.style.visibility="hidden";
obj.filters.blendTrans.Play();
}
}
function fadeIn(obj) {
obj.style.filter="blendTrans(duration=1)";
// Make sure filter is not playing.
if ((obj.visibility != "visible") && (obj.filters.blendTrans.status != 2)) {
obj.filters.blendTrans.Apply();
obj.style.visibility="visible";
obj.filters.blendTrans.Play();
}
}
-->
</SCRIPT>
</HEAD>
<body style="filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#ff00ff', startColorstr='#800000', gradientType='0');">
<div ID="oDiv" STYLE="visibility:hidden;width:1024; color:#FFFF00; font-family:Lucida handwriting;font-size:xx-large;text-align:center;">M A C ' S P L A C E !</div>
<BUTTON onclick="fadeOut(oDiv)" STYLE="background-color: blue; color: white">Fade Text Out</BUTTON>
<BUTTON onclick="fadeIn(oDiv)" STYLE="background-color: blue; color: white">Fade Text In</BUTTON>
</BODY>
</HTML>