• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Q&A

Q1: Are there other, "secret," attributes besides OnMouseOver, OnMouseOut, OnBlur, and OnFocus that I can use just as easily? And can I put them anyplace other than in an <a> or <input> tag?
A1: Yes and yes. Each HTML tag has an associated set of JavaScript attributes, which are called events. For example, OnClick can be used within the <a> tag and some forms tags to specify a command to be followed when someone clicks that link or form element. Refer to Appendix C, "Complete HTML 4 Quick Reference," for a complete listing of the events you can use in each tag.
Q2: Doesn't Microsoft use a different scripting language for Internet Explorer?
A2: Yes, Microsoft recommends using a scripting language based on Visual Basic called VBScript, but Microsoft Internet Explorer version 3 or later also supports JavaScript. Many commands work slightly differently in the Microsoft implementation of JavaScript than they do in Netscape Navigator, however. Fortunately, the simple commands covered in this hour work exactly the same in both browsers so you can use them with confidence.
Q3: I tried using the tricks from this hour with images that were arranged in a table, but it didn't always work. Why?
A3: There's a bug in Netscape Navigator 3 that causes problems when you dynamically change images in a table. The trouble was corrected in Netscape Navigator 4 and was never an issue with Microsoft Internet Explorer. Because some people still use Navigator 3, it's safer to avoid changing any image within a table using JavaScript.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint