Hi everybody
Wonder if you could help me out.
I created a simple JavaScript routine to enable a user to click backwards
and forwards between small news articles. This routine works fine in IE and
Safari, but in the latest FireFox I get no title or article, but do see the
prev and next links and the article number.
My HTML and JS simple routine is as follows:
<DIV CLASS="LatestNewsTitle" ID="NewsTitle" NAME="NewsTitle"> </DIV>
<DIV CLASS="LatestNewsText" ID="NewsText" NAME="NewsText"> </DIV>
<SPAN NAME="NewsPrev" ID="NewsPrev"><A HREF="javascript:void(0)"
OnClick="NewsNextPrev(thepage-=1)">Prev</A></SPAN>
<SPAN NAME="NewsNext" ID="NewsNext"><A HREF="javascript:void(0)"
OnClick="NewsNextPrev(thepage+=1)">Next</A></SPAN>
<SCRIPT LANGUAGE="javascript">
<!--
var thepage = 1;
var thePrevEnabled = '<A HREF="javascript:void(0)"
OnClick="NewsNextPrev(thepage-=1)">Prev</A>';
var thePrevDisabled = ' ';
var theNextEnabled = '<A HREF="javascript:void(0)"
OnClick="NewsNextPrev(thepage+=1)">Next</A>';
var theNextDisabled = ' ';
var theTitleText = new Array(1);
var theParaText = new Array(1);
theTitleText[1]='';
theTitleText[1]+='e-mail warning';
theParaText[1]='';
theParaText[1]+='An e-mail from su*****@mydomain.co.uk is not from us.';
function NewsStartText() {
self.NewsPrev.innerHTML = thePrevDisabled;
self.NewsNext.innerHTML = theNextDisabled;
self.NewsTitle.innerHTML = theTitleText[thepage];
self.NewsText.innerHTML = theParaText[thepage];
}
function NewsNextPrev(thepage) {
self.NewsPrev.innerHTML = thePrevDisabled;
self.NewsNext.innerHTML = theNextDisabled;
self.NewsTitle.innerHTML = theTitleText[thepage];
self.NewsText.innerHTML = theParaText[thepage];
return true;
}
NewsStartText()
//-->
</SCRIPT>
As it has stumped as to why Safari works OK and not FireFox when I thought
they 'fire off the same bat', do you have any idea as to what I'm doing
wrong?
Thanks
Robbie
PS: My Javascript functionality checkbox is ticked and it seems to be this
specific script rather than JS in general.