Mouseover error in mozilla

I have a piece of javascript that performs a style change on mouseover and a function onclick.
It works perfectly in IE (5+) yet i get this error in mozilla: "Error: m_over is not defined",
"Error: go is not defined" and "Error: m_out is not defined".
These are the functions:

function m_over(src) {
 src.style.textDecoration = 'underline';
 src.style.cursor = 'hand';
}
function go(what) {
 alert(what+"\n\nnormally you can do something here");
}

called using this html code:
<td id="htl" onclick="go('home');" onmouseover="m_over(this);" onmouseout="m_out(this);">

It works perfectly in IE, yet it simply does nothing in mozilla. I have not tested this in netscape.
dabazzaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ahosangFinance Systems DeveloperCommented:
I have to say it works for me in Moz, so please give us a link to your page or show a stripped version of code.
Also, it's cursor='pointer', NOT cursor='hand'

<html>
<head>

<script>
function m_over(src) {
 src.style.textDecoration = 'underline';
 src.style.cursor = 'pointer';
}
function m_out(src) {
  src.style.textDecoration='none';
  src.style.cursor='default';
}
function go(what) {
 alert(what+"\n\nnormally you can do something here");
}
</script>
</head>

<body>
<span id="htl" onclick="go('home');" onmouseover="m_over(this);" onmouseout="m_out(this)">hello there</span>
</body>
</html>
0
jaysolomonCommented:
Where is your m_out function?

everything works except the m_out function.i assume it reverts m_over back to the original state
0
jaysolomonCommented:
sorry ahosang

Did not reload question
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

dabazzaAuthor Commented:
Best I could do is to upload a stripped down version to http://v6.n-12.net/test.html
0
jaysolomonCommented:
Change this

<script language="JScript">

to this

<script type="text/javascript">

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jaysolomonCommented:
also you need to add this

<html>
<head>
<script type="text/javascript">
//Your scripts here

</script>
</head>
<body>
<!-- Content Here -->
</body>
</html>
0
jaysolomonCommented:
Lastly here the whole page fixed (not valid HTML)

<html>
<head>
<script type="text/javascript">
<!--
function m_over(src) {
 src.style.textDecoration = 'underline';
 src.style.cursor = 'pointer';
}
function m_out(src) {
 src.style.textDecoration = 'none';
}
function go(what) {
 alert(what+"\n\nnormally you can do something here");
}
// -->
</script>

</head>
<body>
<div align="center">
  <center>

<table border="0" cellpadding="0" cellspacing="0" style="border-style:solid; border-width: 1px; border-color:#000000; padding:0; border-collapse: collapse" bordercolor="#111111" width="90%">
  <tr>
    <td colspan="2" background="background_header.bmp" height="61" align="left" valign="bottom" style="padding: -1px">
    <img border="0" src="nav%20left.bmp"><br></td>  </tr>
  <tr>

    <td width="100%" colspan="2" background="top_nav_header.bmp" height="35" valign="top">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="40%" height="35" id="top_nav_tab">
      <tr>
        <td width="32%" id="htl" onclick="go('home');" onmouseover="m_over(this);" onmouseout="m_out(this);">
        <p align="center"><b><span style="font-variant: small-caps">
        <font face="Verdana" color="#8D98A9" size="2">home</font></span></b></td>
        <td width="1%">
        <img border="0" src="top_nav_spacer.bmp" width="5" height="35"></td>

        <td width="32%" id="stl" onclick="go('scripts');" onmouseover="m_over(this);"onmouseout="m_out(this);">
        <p align="center"><b><span style="font-variant: small-caps">
        <font face="Verdana" color="#8D98A9" size="2">scripts</font></span></b></td>
        <td width="1%">
        <img border="0" src="top_nav_spacer.bmp" width="5" height="35"></td>
        <td width="32%" id="mtl" onclick="go('media');" onmouseover="m_over(this);">
        <p align="center"><b><span style="font-variant: small-caps">
        <font face="Verdana" color="#8D98A9" size="2">media</font></span></b></td>

        <td width="1%">
        <img border="0" src="top_nav_spacer.bmp" width="5" height="35"></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="174" background="nav_repeat_left.bmp" height="1" valign="top"><img src="blank.gif" width="175" height="1"></td>
    <td width="99%" height="1"></td>

  </tr>
  <tr>
    <td width="174" background="nav_repeat_left.bmp" height="300" valign="top">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
      <tr>
        <td width="11%"><img border="0" src="icons/home.bmp" width="16" height="16"></td>
        <td width="89%">
    <font face="Verdana" size="2" color="#3366CC">
    <span style="font-variant: small-caps; font-weight: 700">home</span></font></td>

      </tr>
      <tr>
        <td width="11%">
<img border="0" src="icons/php.bmp" width="16" height="16"></td>
        <td width="89%">
    <b><span style="font-variant: small-caps">
    <font face="Verdana" color="#3366CC" size="2">php</font></span></b></td>
      </tr>
      <tr>

        <td width="11%">&nbsp;</td>
        <td width="89%">&nbsp;</td>
      </tr>
    </table>
    <p align="left">&nbsp;<p align="left">&nbsp;
    <font face="Verdana" size="2" color="#3366CC">
    <span style="font-variant: small-caps; font-weight: 700"><br>
    <br>
    </span>

    <br>
    <img border="0" src="spacer.bmp" width="175" height="3"></span></font><br>
<span style="padding-left: 18px; font-variant: small-caps; font-weight: 700">&nbsp;</span></td>
    <td width="99" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td width="100%" background="base_repeat.bmp" colspan="2" height="35">&nbsp;</td>
  </tr>
</table></center>
</div>
0
jaysolomonCommented:
sorry typo

add this to the end

</body>
</html>
0
dabazzaAuthor Commented:
Brilliant, thanks for clearing that all up for me, now it all runs perfectly in Mozilla. (had to accept the higher up answer as it was the main fix)
0
jaysolomonCommented:
Glad we could help, and thanks

jAy
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.