matthew9090 Posted June 1, 2011 Share Posted June 1, 2011 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! Quote Link to comment Share on other sites More sharing options...
arbitter Posted June 1, 2011 Share Posted June 1, 2011 I copied the exact scripts you have and it works fine. You must have forgotton to include the js file? Quote Link to comment Share on other sites More sharing options...
.josh Posted June 1, 2011 Share Posted June 1, 2011 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. Quote Link to comment Share on other sites More sharing options...
matthew9090 Posted June 2, 2011 Author Share Posted June 2, 2011 thanks for the replies but i fixed it now. i just change title to a different function name. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.