robbie71321 Posted March 3, 2009 Report Share Posted March 3, 2009 Point your mouse here! Quote Link to comment Share on other sites More sharing options...
LSW Posted March 3, 2009 Report Share Posted March 3, 2009 Just a technicality, but it can cause confusion. This is JavaScript (JS) - it is a scripting language from Netscape. Java is a Programming language from Sun Microsystems. They are two different critters. Quote Link to comment Share on other sites More sharing options...
lwsimon Posted March 4, 2009 Report Share Posted March 4, 2009 document.write() is deprecated and is poor form. It works by immediately inserting text into the document while it is still being rendered by the browser - in this case, you're calling it after the document is loaded, so it ha nowhere to write to. Try this: function mouseOver() { alert("hello!!"); } function mouseOut() { alert("goodbye!!!"); } That should give you a popup when you go in and out of the area. Quote Link to comment Share on other sites More sharing options...
robbie71321 Posted March 4, 2009 Author Report Share Posted March 4, 2009 thanks Iwsimon, you clarified to me that I had the right idea but the "wrong" code . I thought I had left out a ";" or something else ... more learning to do Would this problem have showed up if I used a debugger ? Thanks again Quote Link to comment Share on other sites More sharing options...
lwsimon Posted March 4, 2009 Report Share Posted March 4, 2009 What browser are you using to test in? If you're using IE, I would strongly suggest that you download Firefox, and use Firebug for Javascript debugging. Its error messages are much, much better than IE's. This would not have shown up though. A debugger can only tell you when you've made a syntax error. This is a logic error - you're writing to a document that is already rendered. Do you have past experience programming? If not, I would actually suggest learning PHP before learning Javascript. PHP is more "traditional" and has better documentation. A lot of people, including people who write tutorials, write very poor javascript. 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.
Note: Your post will require moderator approval before it will be visible.