Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- Javascript errors on clients machine?


BenG - 8:49 am on Sep 10, 2002 (gmt 0)


another forum user posted the following
Saw your site and your client is right . your buttons do send you where you want to go , but they dissapear the minute you click on them and you have to browse over to make them reappear again !

Browsers with this behaviour so far include
Windows 98, IE 5.00.2919.6307. Windows 2k
Pro, IE 5.00.2919.6307. WinXP pro Explorer 6.

Here is the swap button code
function changeMenu(next){
var layers=chosen+"Layer";
if (chosen!="present") {
if (isNS4) {
document.layers[chosen+"Layer"].visibility = "hide"
}
if(isIE4){
document.all[chosen+"Layer"].style.visibility = "hidden";
}
if(isDOM){
document.getElementById(chosen+"Layer").style.visibility = 'hidden';
}
}
//need to hide scroller if chosen already
if (chosen=="present"){
hidePresent()
}
if (next!="present") {
if (isNS4) {
document.layers[next+"Layer"].visibility = "show"
}
if(isIE4){
document.all[next+"Layer"].style.visibility = "visible";
}
if(isDOM){
document.getElementById(next+"Layer").style.visibility = 'visible';
}
}
//show scroller if chosen
if (next=="present"){
showPresent();
}
//swap existing highlighted button back to original state
returnImage='images/buttons/'+chosen+'.gif';
if (isNS4) {
document.images[chosen].src = returnImage;
}
if(isIE4){
document.images[chosen].src = returnImage;
}
if(isDOM){
document.getElementById(chosen).setAttribute('src', returnImage);
}
//set new button to highlighted state
chosen=next;
replaceImage='images/buttons/'+chosen+'_f2.gif'
flip(chosen, replaceImage);
}
and here is the code that sets it
<a href="javascript:void(0)" onClick="javascript:changeMenu('purpose')" onMouseOut="restoreImage('purpose')" onMouseOver="swapImage('purpose'); return false;">
I did have a on click="this.blur()" which i have removed to see wether that would help.
Starway - thanks for the input however your code will not swap an image in netscape 6.1 and greater.


Thread source:: http://www.webmasterworld.com/javascript/187.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com