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="LatestNe wsTitle" ID="NewsTitle" NAME="NewsTitle "> </DIV>
<DIV CLASS="LatestNe wsText" ID="NewsText" NAME="NewsText" > </DIV>
<SPAN NAME="NewsPrev" ID="NewsPrev">< A HREF="JavaScrip t:void(0)"
OnClick="NewsNe xtPrev(thepage-=1)">Prev</A></SPAN>
<SPAN NAME="NewsNext" ID="NewsNext">< A HREF="javascrip t:void(0)"
OnClick="NewsNe xtPrev(thepage+ =1)">Next</A></SPAN>
<SCRIPT LANGUAGE="javas cript">
<!--
var thepage = 1;
var thePrevEnabled = '<A HREF="javascrip t:void(0)"
OnClick="NewsNe xtPrev(thepage-=1)">Prev</A>';
var thePrevDisabled = ' ';
var theNextEnabled = '<A HREF="javascrip t:void(0)"
OnClick="NewsNe xtPrev(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 support@mydomai n.co.uk is not from us.';
function NewsStartText() {
self.NewsPrev.i nnerHTML = thePrevDisabled ;
self.NewsNext.i nnerHTML = theNextDisabled ;
self.NewsTitle. innerHTML = theTitleText[thepage];
self.NewsText.i nnerHTML = theParaText[thepage];
}
function NewsNextPrev(th epage) {
self.NewsPrev.i nnerHTML = thePrevDisabled ;
self.NewsNext.i nnerHTML = theNextDisabled ;
self.NewsTitle. innerHTML = theTitleText[thepage];
self.NewsText.i nnerHTML = 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.
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="LatestNe wsTitle" ID="NewsTitle" NAME="NewsTitle "> </DIV>
<DIV CLASS="LatestNe wsText" ID="NewsText" NAME="NewsText" > </DIV>
<SPAN NAME="NewsPrev" ID="NewsPrev">< A HREF="JavaScrip t:void(0)"
OnClick="NewsNe xtPrev(thepage-=1)">Prev</A></SPAN>
<SPAN NAME="NewsNext" ID="NewsNext">< A HREF="javascrip t:void(0)"
OnClick="NewsNe xtPrev(thepage+ =1)">Next</A></SPAN>
<SCRIPT LANGUAGE="javas cript">
<!--
var thepage = 1;
var thePrevEnabled = '<A HREF="javascrip t:void(0)"
OnClick="NewsNe xtPrev(thepage-=1)">Prev</A>';
var thePrevDisabled = ' ';
var theNextEnabled = '<A HREF="javascrip t:void(0)"
OnClick="NewsNe xtPrev(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 support@mydomai n.co.uk is not from us.';
function NewsStartText() {
self.NewsPrev.i nnerHTML = thePrevDisabled ;
self.NewsNext.i nnerHTML = theNextDisabled ;
self.NewsTitle. innerHTML = theTitleText[thepage];
self.NewsText.i nnerHTML = theParaText[thepage];
}
function NewsNextPrev(th epage) {
self.NewsPrev.i nnerHTML = thePrevDisabled ;
self.NewsNext.i nnerHTML = theNextDisabled ;
self.NewsTitle. innerHTML = theTitleText[thepage];
self.NewsText.i nnerHTML = 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.
Comment