Thank you again for all your help guys so far, have 2 issues with the code below as with my very limited experience of JavaScript (just going on a few hours now lol) was wondering if anyone could help.
1) The code does its job but it seems to change to boldly when it comes in, you will see what I mean if you test it, it comes in to bold, and can anyone make it smoother and fade in nicely.
2) 2nd problem the error catch at the end of the statement does not work correctly, I mean when I run it in Netscape which I have been told does not support this script the error message does not show.
PS, Practical example using the code below would be a big help
<!-- This element has the filter applied. -->
<DIV ID="oTransContainer" STYLE="
height:0px; color: #F7F7F7; filter:progid:DXImageTrans
form.Micro
soft.Fade(
duration=1
.0,overlap
=5.0) ">
<!-- This is the first content that is displayed. -->
<DIV ID="oDIV1" STYLE="
height:0px; color: #F7F7F7;"> </DIV>
<!-- This content displays after the first content. -->
<DIV ID="oDIV2" STYLE="
height:0px; color: BLACK;"> </DIV>
</DIV>
<SCRIPT>
try{
var bTranState = 0;
var Quotes = new Array();
Quotes[0] = "I have been a client of Connecting London for well over five years. Their service is always courteous, personal and efficient. N. Zayan (Private Client)";
Quotes[1] = "We have been using Connecting London for over ten years for all our IT needs, from telephone systems and mobile phones to computers and handhelds. They are always helpful, and professional and we have complete confidence in them. Georgia Oetker (Private Client)";
Quotes[2] = "For more than twenty years Connecting London has supported the technology we use in our businesses. More recently they have helped us develop successful websites which are visible and get great results with the main search engines. J V Neville-O'Brien, Leisure Finance Ltd. (Corporate Client)";
Quotes[3] = "We have been using Connecting London as our IT Consultants for the past 3 years and have always found the service friendly and very helpful. Rebecca Maxwell, Sloane Management Limited";
Quotes[4] = "We turned to Connecting London to help set up our London based offices, after a bad experience with a poorly motivated provider. Since our decision, we have enjoyed a high level of expertise and prompt service at a competitive price. Reagan Thompson, AdAstra Partners International";
function quotePrint()
{
var index = parseInt(Math.random()*Quo
tes.length
);
return Quotes[index];
}
function fnToggle() {
oTransContainer.filters[0]
.Apply();
if (bTranState=='0') {
bTranState = 1;
oDIV2.style.visibility="vi
sible";
oDIV1.style.visibility="hi
dden";
oDIV2.innerHTML = quotePrint();
}
else {
bTranState = 0;
oDIV2.style.visibility="hi
dden";
oDIV1.style.visibility="vi
sible";
// oDIV1.innerHTML = quotePrint();
}
oTransContainer.filters[0]
.Play();
setTimeout("fnToggle()","5
000");
}
setTimeout("fnToggle()","0
.5");
var z=0;
var x=1/z;
}catch(e){
alert("Seems that your Browser doesn't support my script !!!");
}
</SCRIPT>
Start Free Trial