Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Beginning JavaScript
|
BOOK: Beginning JavaScript
This is the forum to discuss the Wrox book Beginning JavaScript by Paul Wilton; ISBN: 9780764544057
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 31st, 2014, 01:49 PM
Registered User
 
Join Date: Mar 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ch1_examp2.htm not working properly

Ok, so I loaded ch1_examp1.htm in my browser, and it worked like the book said.
But ch1_examp2.htm is acting odd. When I load it, it makes everything red, but it will show the script block "Second Script Block" without showing the first one. And the text on the page says:
Paragraph 1
// Script block 1 alert("First Script Block");
Paragraph 2

When I click OK will display Paragraph 3 on the page along with the other paragraphs. I am running Firefox 28.0 . Here is the code that I typed:
Code:
<html>
<body bgcolor="WHITE">
<p>Paragraph 1</p>
</script type="text/javascript">
  // Script block 1
  alert("First Script Block");
</script>
<p>Paragraph 2</p>
<script type="text/javascript">
  // Script Block 2
  document.bgColor = "RED";
  alert("Second Script Block");
</script>
<p>Paragraph 3</p>
</body>
</html>
Also, I am using Notepad++ if that makes any difference.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Form's calculated field not working properly PaulJH Access 11 March 5th, 2007 09:52 AM
ch 8 code is not working properly Dev_gh78 C# 1 August 4th, 2006 12:16 AM
Banner ad values not working properly. malhyp Dreamweaver (all versions) 3 January 17th, 2006 03:42 AM
PreparedStatement not working properly wslyhbb Java Databases 3 September 9th, 2003 01:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.