Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Beginning JavaScript 5th Edition
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #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
Reply With Quote
  #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?
Reply With Quote
  #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
Send a message via Skype™ to PiotrG
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.
Reply With Quote
  #4 (permalink)  
Old March 1st, 2017, 04: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.
Reply With Quote
  #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: 25%
Activity: 25% Activity: 25% Activity: 25%
 
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?
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 05: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 01:06 PM
CH 14 A Simple EntityDataSource Application - Error! leeWozyWarren BOOK: Beginning ASP.NET 4 : in C# and VB 5 December 7th, 2011 01: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



All times are GMT -4. The time now is 09:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.