The javascript code below swaps a LOG IN and LOG OUT image depending on the contents of a field elsewhere.
This works a treat in Internet Explorer (v4.01 and above), but in Netscape and FireFox it only displays the LOG OUT button.
Are the any Netscape bods out there who can tell me why Netscape always goes down the first logic path and shows the LOG OUT button?
Is it something to do with the innerHTML tag?
Many thanks,
Dave
www.youraromatherapy.co.uk
---
function SwitchLoginButton()
{
if (document.getElementById('pnMemberName') != null)
{
if (document.getElementById('pnMemberName').innerHTML.length > 30)
{
document.getElementById('pnLogout').style.display = 'block';
document.getElementById('pnLogin').style.display = 'none';
}
else
{
document.getElementById('pnLogout').style.display = 'none';
document.getElementById('pnLogin').style.display = 'block';
}
}
}
---
This works a treat in Internet Explorer (v4.01 and above), but in Netscape and FireFox it only displays the LOG OUT button.
Are the any Netscape bods out there who can tell me why Netscape always goes down the first logic path and shows the LOG OUT button?
Is it something to do with the innerHTML tag?
Many thanks,
Dave
www.youraromatherapy.co.uk
---
function SwitchLoginButton()
{
if (document.getElementById('pnMemberName') != null)
{
if (document.getElementById('pnMemberName').innerHTML.length > 30)
{
document.getElementById('pnLogout').style.display = 'block';
document.getElementById('pnLogin').style.display = 'none';
}
else
{
document.getElementById('pnLogout').style.display = 'none';
document.getElementById('pnLogin').style.display = 'block';
}
}
}
---
Comment