Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Beginning JavaScript 4th Edition
|
BOOK: Beginning JavaScript 4th Edition
This is the forum to discuss the Wrox book Beginning JavaScript, 4th Edition by Paul Wilton, Jeremy McPeak; ISBN: 978-0-470-52593-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript 4th Edition 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 15th, 2015, 12:13 PM
Registered User
 
Join Date: Mar 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 1 Example 1- not working in browser

Hi everyone, I am having a problem with my browsers.

When I open the file (in both Chrome and Firefox) from the very first example in the book, all I see is a solid black page. I feel like an idiot missing something quite obvious here...
I have triple checked the code:

<html>
<body bgcolor=”WHITE”>
<p>Paragraph 1</p>
<script type=”text/javascript”>
document.bgColor = “RED”;
</script>
</body>
</html>


This is the error message I see when I open Web Developer in Firefox:
"The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol."


How can something so simple be going so wrong? What am I missing, how can I fix this problem?
All help is much appreciated.
 
Old June 22nd, 2015, 02:21 PM
Registered User
 
Join Date: Dec 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

Try adding the tag <!doctype html> at the very beginning, before the html tag. Sometimes browsers won't render properly without this declaration.
 
Old March 29th, 2016, 07:46 AM
Registered User
 
Join Date: Mar 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In my case, the problem was with brackets. Just make sure to use " " or ' ', and not ” ”.





Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 2 - run page in browser WebPete BOOK: Beginning ASP.NET Web Pages with WebMatrix 2 December 1st, 2014 04:02 PM
source files for controls are not working in browser benjii82 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 26th, 2009 04:14 PM
Links stop working when browsing with IE browser itHighway Classic ASP Basics 1 August 29th, 2009 12:57 PM
Chapter 4 Corss-Browser XSLT problem 50000 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 May 17th, 2006 12:35 PM





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