Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document.all in Firefox - Mac browsers

Status
Not open for further replies.

rebelnz

Programmer
Mar 8, 2005
2
NZ
Hi there

Can you shed any light on this error - it's a drop down menu I've got working in IE but not Firefox, Safari or Mac IE.

Mozilla javascript console tells me document.all is non standard and to use WC3 standard document.getElementById() instead but it still doesn't work - also does anyone know how to get this code working on Mac browsers?

website is at
jscript code is here - the original is commented out:

<script type="text/javascript">
<!--
function showmenu(elmnt)
{
//document.all(elmnt).style.visibility="visible"
document.getElementById(elmnt).style.visibility="visible"
}

function hidemenu(elmnt)
{
//document.all(elmnt).style.visibility="hidden"
document.getElementById(elmnt).style.visibility="hidden"
}


//-->
</script>

Any suggestions would be appreciated, thanks!
rebelnz
 

What error do you get in the FF JS console with the new code? It should work just fine.

Dan


The answers you get are only as good as the information you give!

 
Incidentally, you really should:

- Remove all font tags from your page and use CSS instead. The font tag is no longer part of the standard, and it is unknown how much longer browsers will actually support it.

- Try and combine the above excersize with removal of "b" tags in favour of CSS.

- Use a valid DOCTYPE for maximum compatibility between all browsers (you may have to tweak your layout a small amount after including one - but do make sure it is actually a valid one, not a half-baked one).

- Read this article on getting pages to validate when they have Flash content:


Hope this helps,
Dan


The answers you get are only as good as the information you give!
 
Thanks for the - will go and try these out.
The FF messages where the same, but I need to put a little more testing into it.

Thanks heaps for the tips, really appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top