Datasheet
Chapter 1: Introduction to JavaScript
18
the address bar. If you are running Internet Explorer, you may get a security warning prompt, as in
Figure 1 - 6. When running JavaScript off the file system in IE, you are running in a different security
sandbox with tighter restrictions on active content. You can change your browser settings or just allow
the content on that page by clicking the button and choosing Allow Blocked Content.
Ultimately, you ’ re going to want to set up a web server on your computer to do proper testing of Ajax
RPCs. On Windows you can set up the free Internet Information Services (IIS) server by first installing it
from the Control Panel
Add/Remove Programs. You should be able to put HTML documents in
C:\inetpub\wwwroot\ and view them in your browser by surfing http://localhost .
On OSX is a built - in Apache web server that can be activated from the System Preferences application by
clicking Sharing and selecting Web Sharing.
Figure 1-6
The Test Browser
Once you ’ ve got your IDE and your web server set up (if indeed you want to have a web server), make
sure you ’ ve got a good cross - section of browsers to test with. The latest numbers (November 2008) report
that Internet Explorer, Firefox, and Safari should be on your list for testing. These provide good coverage
of the marketplace, and if your code runs in these, they will most likely run in newer versions of Opera,
Netscape, and Google Chrome.
CH001.indd 18CH001.indd 18 6/25/09 7:53:22 PM6/25/09 7:53:22 PM