p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning JavaScript 5th Edition (http://p2p.wrox.com/forumdisplay.php?f=793)
-   -   Error in Ch. 14 example 1 (http://p2p.wrox.com/showthread.php?t=94954)

TheWildJacko September 10th, 2015 01:33 PM

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

TheWildJacko September 10th, 2015 02:09 PM

FWIW, Example 2 seems to work perfectly fine, so it would seem there's something up with the ch14_formvalidator.php file?

PiotrG October 11th, 2015 08:13 AM

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.

soxxfoxx March 1st, 2017 05:15 PM

Any luck?
 
I'm running into the same error, did you have any luck resolving it? Apache 2.4.23 / PHP 5.6.27.

miketaoyang@gmail.com October 6th, 2017 12:18 PM

Anybody is actually monitoring this?
 
I run into the same error, is there a solution yet?


All times are GMT -4. The time now is 09:31 AM.

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