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

Q&A

Q1: I've seen scrolling messages that were in the upper part of a page, not the status line, and they included extra features, such as allowing users to click on part of the message to jump to a page. Can JavaScript create this type of scrolling message?
A1: A Most of these messages are created with Java, which is a bit more powerful. You can scroll messages in the body of the page with JavaScript, though, either using a text field in a form or using the layers feature of Dynamic HTML.
Q2: I know JavaScript can create graphics that change when the mouse moves over them. What about graphics that change when you click on them?
A2: Yes, JavaScript can also detect when a user has clicked on a graphic. You'll learn how to do this in Hour 12, “Responding to Events.”
Q3: JavaScript can detect different versions of browsers. Can I use it to detect whether the browser supports JavaScript?
A3: You can't do this, strictly speaking, because a browser that doesn't support JavaScript won't run your script at all. However, for browsers that do support scripting, you can detect the version of JavaScript supported. You can also use HTML comments and the <noscript> tag, as described in Hour 1.
Q4: I copied a different script to one of my pages, but it doesn't work. Have I made a mistake?
A4: There are many reasons why the script might not work, and you may have better luck after you've learned more about JavaScript. If you don't have luck getting the script to work, try asking the creator of the script for help.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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