Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning JavaScript 5th Edition
This is the forum to discuss the Wrox book Beginning JavaScript, 5th Edition by Jeremy McPeak; 978-1-118-90333-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript 5th 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
  #1 (permalink)  
Old September 10th, 2015, 01:33 PM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Error in Ch. 14 example 1

I set up Apache and wrote Ch. 14 example 1 correctly, doubled checked httprequest.js and example 1 against the source code downloads, and they're all correct. However, when I try to validate the name or email fields I get this error:

[Error] SyntaxError: JSON Parse error: Unrecognized token '<'
parse (ch14_example1.html, line 102)
handleResponse (ch14_example1.html, line 102)
reqReadyStateChange (httprequest.js, line 9)

And then when I expand the error I get this:

"<br /> <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /Users/jakesmolowe/Sites/ch14_formvalidator.php:1) in <b>/Users/jakesmolowe/Sites/ch14_formvalidator.php</b> on line <b>7</b><br /> <br /> <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /Users/jakesmolowe/Sites/ch14_formvalidator.php:1) in <b>/Users/jakesmolowe/Sites/ch14_formvalidator.php</b> on line <b>8</b><br /> {"available":false,"searchTerm":"jmcpeak"}"

What's going on?

Thanks,

Jake
  #2 (permalink)  
Old September 10th, 2015, 02:09 PM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

FWIW, Example 2 seems to work perfectly fine, so it would seem there's something up with the ch14_formvalidator.php file?
  #3 (permalink)  
Old October 11th, 2015, 08:13 AM
Registered User
Points: 23, Level: 1
Points: 23, Level: 1 Points: 23, Level: 1 Points: 23, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2015
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

This Exercise 1 from chapter 14 works perfectly fine for me. So the php file is correct.
Maybe try install the WAMPServer and then try once again.
  #4 (permalink)  
Old March 1st, 2017, 05:15 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Any luck?

I'm running into the same error, did you have any luck resolving it? Apache 2.4.23 / PHP 5.6.27.
  #5 (permalink)  
Old October 6th, 2017, 12:18 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Anybody is actually monitoring this?

I run into the same error, is there a solution yet?


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Upload error / Ch. 14 wassim84 BOOK: Beginning ASP.NET 4.5 : in C# and VB 9 February 1st, 2015 06:08 PM
Error in Ch. 14 Try It Out FrugalRacer BOOK: Beginning ASP.NET 4 : in C# and VB 5 September 29th, 2014 06:38 AM
Ch.14 .NETFramework error smileys6971 BOOK: Beginning ASP.NET 4 : in C# and VB 8 February 25th, 2013 02:06 PM
CH 14 A Simple EntityDataSource Application - Error! leeWozyWarren BOOK: Beginning ASP.NET 4 : in C# and VB 5 December 7th, 2011 02:28 PM
CH 14 - Link Error - Unresolved Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 2 March 18th, 2008 06:44 PM





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