I get a function not defined error in my firefox javascript console and I can't figure out why. Here's the javascript <script src="findDOM.js"></script> <script language="javascript"> var hideit="true"; var hideit2="true"; function swap_visibility(objID, cellid){ alert("not working"); var domcell = findDOM(cellid, 1); domcell.className = "navbright"; alert("line 3"); var domobj = findDOM(objID, 1); domobj.visibility = "visible"; } function reset_visible(objID, cellid){ var domcell = findDOM(cellid, 1); domcell.className='nav'; var dom = findDOM(objID, 1); if (hideit == "true"){ dom.visibility = "hidden"; hideit = "true"; ) } </script> Here's the calling HTML <td class="nav" id="ddcell" onMouseover="swap_visibility('DrunkDriving', 'ddcell'); return true;" onMouseout="reset_visible('DrunkDriving', 'ddcell'); return true;">DrunkDriving</td> Pretty simple right? So why doesn't it think that neither "swap_visibility" nor "reset_visible" are not found? I must be blind. Thanks in advance.
Yes, good thought. But what you see is in the head tag (obviously aside from the calling html). I'm really stumped, and it's going to end up being something stupid
Is there any more error messages above that? If the function is there but the error message says otherwise, most probably there is a syntax error somewhere which causes the function definition not loaded by the JS engine.
The Javascript console only gives me what I mentioned. It's gotta' be something really stupid where a second pair of eyes will catch it
well, you were right on something ... it was really stupid, it's a ) instead of a } that closes the if { of your last function (see the line before the last } ) Have a nice day