04.07.2013 Views

Start Here! Learn JavaScript - Cdn.oreilly.com

Start Here! Learn JavaScript - Cdn.oreilly.com

Start Here! Learn JavaScript - Cdn.oreilly.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

13. Add another folder by using the same process: in Solution Explorer, right-click the <strong>Start</strong><strong>Here</strong><br />

project, click Add, and then click New Folder. Call this folder css. Your final Solution Explorer<br />

should look like Figure 1-12.<br />

FIGURE 1-12 The final Solution Explorer with two folders added.<br />

What If Your Code Didn’t Work?<br />

You might receive an error when attempting to run your program or view the webpage. Often,<br />

entering that error into your favorite search engine yields helpful results. However, here are<br />

some troubleshooting ideas that might help you along.<br />

■■ Check the syntax <strong>JavaScript</strong> is case sensitive. Ensure that the case used in your code<br />

matches the example exactly. Also, ensure that your tags are properly formatted<br />

and show up between the opening and closing tags.<br />

■■ Check the file location If you save the webpage in the wrong location, the web server<br />

won’t be able to find it, and you’ll receive an error indicating that no default page was<br />

found. Move the file within the project, and run it again to solve this issue.<br />

■■ View Debug Output Visual Studio displays output from its <strong>com</strong>pile and readiness<br />

checks in the Output pane. You might find that your browser won’t run or see other useful<br />

tidbits of information in the Output pane that will help solve the problem.<br />

<strong>JavaScript</strong>’s Limitations<br />

Prior to wrapping up the chapter you should see some of the limitations of <strong>JavaScript</strong>. Some of these<br />

are subtle and might not be obvious. <strong>JavaScript</strong>’s largely client-side role means that there are some<br />

inherent issues you need to consider when developing with the language.<br />

18 <strong>Start</strong> here! <strong>Learn</strong> <strong>JavaScript</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!