Jump to content

simple onmouseover not showing anything


matthew9090

Recommended Posts

i've got this javascript code

<script type="text/javascript">
function show(str) 
{
document.getElementById('div').innerHTML=str;
}
</script>

 

and html code:

<a href='http://link.com' onMouseOver="show('text')">text</a>
<div id="div">

</div>

 

i'm using the google chrome browser and it doesn't come up with anything.

 

when i go to the inspect element on chrome it comes up with: index.php:103Uncaught TypeError: string is not a function. What does it mean!

 

Link to comment
https://forums.phpfreaks.com/topic/238078-simple-onmouseover-not-showing-anything/
Share on other sites

all by itself, that works fine for me (even in Chrome).  What else do you have on your page?  I don't think that error has to do with this code. For one thing, I do not see "string" anywhere in that code, and the error is telling you that you are trying to make a call to a function called "string" and it doesn't exist.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.