Murray said:
This is unnecessarily verbose. Try this -
a { text-decoration: underline; color:#00C; }
a:link {color: blue; }
a:visited {color: fuchsia; }
Why is it not being expressed? That would depend on you page's
markup - can you show me?
Now I am thoroughly confused.
Not by you, I hasten to add , but by a change it what happens now - with
either the verbose or less verbose code, I get a different result.
In IE6, the colour is always fuchsia, whatever I do: hover, visit etc.
In Firefox, the colour starts as blue. When I click, the colour changes to
fuchsia. For some reason, the code invoked when I click the reference
doesn't work, even though the colour changes. The changed colour is still
there when I reopen the site locally. Why the colour doesn't reset itself,
I also don't know.
I can also see no other colours but these two ineither browser.
I need to work on why the code doesn't work in Firefox. But the basic
setup is this (which works in IE6 except for always showing the same
colour)
This function is executed for several ranges e.g. 1,38 (Example is first
group Family on page "Picture Album" on my site)
function writeSlide(lower,upper)
{
document.write('<table class="thumbs">')
var windowHtml = ' '
for (var i = lower ; i <= upper ; i++)
{
if ( (i - lower + 1) % 8 == 1 )
document.write('<tr>')
windowHtml
+= '<td class="pcenter">'
+ '<a href="#' + i
+ '" onclick="newWindow(Slides[' + (i - 1) + '],Captions[' + (i - 1)
+ '])"'
+ 'onmouseover="toolTip(tt_larger,this)">'
+ '<img id="Thumbs' + i + '" alt=""><br>'
+ '<span id="Text' + i + '" class="whitebg 75pc"></span></a>'
+ '</td>'
if (i == upper || (i - lower + 1) % 8 == 0)
{ document.write(windowHtml + '</tr>')
windowHtml = ' ' }
}
document.write('</table>')
}
It generates
<table class="thumbs">
<tr>
<td class="pcenter">
<a href="#1' onclick="newWindow(Slides[0],Captions[0])"
onmouseover="toolTip(tt_larger,this)">
<img id="Thumbs1" alt=""><br>
<span id="Text1" class="whitebg sz13"></span></a>
</td>
<!-- repeated another 37 times, incrementing the counter, except that
every 8th occurrence has </tr><tr> added -->
</tr>
</table>
The images and captions are inserted by this function
function LoadThumbs()
{
for (i = 0 ; i < Slides.length ; i++)
{
document.images["Thumbs" + (i + 1)].src = Thumbnails
document.getElementById("Text" + (i + 1)).innerHTML=
'<span class="whitebg">' + (i + 1) + '. ' + Captions + '</span>'
}
}
(Now I see this, I will probably put this functionality into
writeSlide() - it doesn't have to be a separate function)
Classes used are:
.sz13 {font-size: 13px; }
.pcenter {text-align: center; }
.whitebg {background-image: url(""); background-color: white; }
The function toolTip() is just that.
The function newWindow() is the one that doesn't work in Firefox.
function newWindow(img,caption)
{
new function testit()
{
var imageToLoad = new Image()
imageToLoad.src = img
var h = imageToLoad.height
var w = imageToLoad.width
var windh = h + 50
// check to see if we have the dimensions and if not, wait 0.5 second
and go back
if (h*w == 0)
setTimeout('testit()',500)
else
spawnJimcoPopup
('picture.html?picture=' + img + '&caption=' + caption
+ '&height=' + h + '&width=' + w
, '_blank'
,
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'
, windh,w,'center','0','pixel')
}
}
In IE6 it opens the image in a new window sized according to the size of
the image. I need to figure out why it doesn't work in Firefox.
I guess this is too much info. Anyway, I will update all the web code from
my local copy to make sure you see the same thing