Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Ajax ISBN: 978-0-471-77778-6
This is the forum to discuss the Wrox book Professional Ajax by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780471777786
Important: For the new 2nd edition of this book, please post here instead: [url="http://p2p.wrox.com/forum.asp?FORUM_ID=307"]http://p2p.wrox.com/forum.asp?FORUM_ID=307[/url]
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax ISBN: 978-0-471-77778-6 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 13th, 2006, 09:14 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Autosuggest Exception thrown

I'm getting the following error running the Autosuggest code from the book:

Line: 104
Error: Exception thrown and not caught

I am using the code exactly as it is in the book except for replacing suggestions.php with some code appropriate to my environment (which is Oracle).

This is IE 6.0

What am I doing wrong? Thanks -

 
Old March 13th, 2006, 09:44 PM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Hi,

You need to realize that as soon as you change the code that's in the book, it's nearly impossible for us to know what a generic error message such as this means. The example in the book works perfectly, so the error must be in the changes you made.

That being said, the most likely culprit is that the code you added/changed is not producing valid JSON code. The JSON parser will throw an error whenever an unexpected piece of syntax is encountered. Double check your JSON output and you'll probably find the error.

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old March 14th, 2006, 09:44 AM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

but ... but ... but ...

I don't think I'm ever getting to my code - the first thing (after writing the header) I do is write to the error_log to validate that I did, indeed, get to that code. Nothing is being written there, so ...

That being said, I did have this function working a couple of weeks ago, had to drop it to install PHP 5 and work on something that was hot, then came back to this and was really disappointed.

I believe my "suggestions.php" will work just fine if it ever gets there - is there any other way I should test whether it is receiving control?

 
Old March 14th, 2006, 10:19 AM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And ... apparently PHP 5 is pickier about how you access Oracle. (i.e. the error is in the suggestions.php code) AND I'm now getting error log messages (still don't know why I wasn't getting those before). The javascript is receiving some warning messages from PHP in addition to the jsonified data from the db so I understand why it doesn't know what to do with it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
exception is never thrown in body of try statement annumol Pro Java 1 February 11th, 2008 06:53 AM
Ch.7 - Autosuggest example - Exception Error Joel Chaney BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 March 27th, 2007 09:35 AM
Database does not update, no exception thrown hexOffender VB Databases Basics 5 November 24th, 2006 03:28 PM
Exception has been thrown by the target of an invo rajasarkar ASP.NET 1.0 and 1.1 Professional 2 June 19th, 2006 03:19 AM
Exception thrown Invalid_Viewstate r_ganesh76 ASP.NET 1.0 and 1.1 Professional 1 December 2nd, 2005 04:32 PM





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