Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6
This is the forum to discuss the Wrox book Professional Ajax, 2nd Edition by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780470109496
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 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 December 6th, 2007, 08:22 AM
fly fly is offline
Registered User
 
Join Date: Dec 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default AjaxMail doesn't work ?!

I've set up the AjaxMail example from the book. Downloaded the files and uploaded to the server, set up the database, the url is something like: www.myexampledomain.com/AjaxMail
I made only changes in the config.inc file - appropriate server, database and account data.
The page shows only default folders and actions, but the list of the mails for the Inbox missing. Just "Loading...". Nothing works.

Does anybody know what I have to change in other files, or something else, to test this example?

Thanx in advance.

The environment is:
Apache/2.0.52 (Red Hat)
php 4.3.9
mysql 4.1.20
Reply With Quote
  #2 (permalink)  
Old December 9th, 2007, 01:26 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

It's a little bit difficult to debug your code without some more specific information. Can you check the database table to see if there's any data there? Have you typed in your email address and mail server information correctly?

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
Reply With Quote
  #3 (permalink)  
Old December 10th, 2007, 01:54 AM
fly fly is offline
Registered User
 
Join Date: Dec 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know for shore, that the config file was filled with correct data, and the database was made from downloaded sql files correctly.

I done some debugging.
To start the mail client, I needed to escape the check mail line
in AjaxMail.inc (line 68,$this->checkMail();), and because I found the JSON.php file wrong (the class Services_JSON is missing), I replaced it with file downloaded from the http://pear.php.net/pepr/pepr-proposal-show.php?id=198.
Send mail option started to work but after sending the mail it stopped. I found some errors in the AjaxMail.js.

Line 104: this.info = vInfo.parseJSON();
replaced with: this.info = JSON.parse(vInfo);

Line 117: this.message = vMessage.parseJSON();
replaced with: this.message = JSON.parse(vMessage);

Line 625: var oResponse = sData.parseJSON();
replace with: var oResponse = JSON.parse(sData);

After replacing the JSON.php file and correcting those lines, the mail client sent the mail and didn't stop after it.

Still, the check mail action fails on $this->checkMail() line and stops the mail client totally. Somewhere in the pop3.class.php is the problem, but I didn't investigate it.

To see how the original files downloaded from Wrox works, follow the link:
http://aoc.tiborasfly.com/AjaxMail_wrox/

Also, I downloaded the AjaxMail from http://sourceforge.net/projects/ajaxmail/ , it's fails to work too. I found errors in this version too.

English is not my native language. I hope that this lines clearly represents the problem.
Reply With Quote
  #4 (permalink)  
Old December 10th, 2007, 12:51 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

I'm wondering if perhaps you downloaded the code from the first edition instead of the second? It seems like the code issues you're mentioning were for older versions of the AjaxMail components, both client and server. If you're sure you've downloaded the code from the second edition, it may be that older components were included by mistake.

I'll take a look later and try to figure it out.

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
Reply With Quote
  #5 (permalink)  
Old December 10th, 2007, 01:10 PM
fly fly is offline
Registered User
 
Join Date: Dec 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The downloaded code is from the second edition. I checked out again.
I hope, you will catch some time to set up the AjaxMail and test it.
It would be nice to see completely functional.
Reply With Quote
  #6 (permalink)  
Old March 18th, 2009, 09:18 PM
Registered User
 
Join Date: Mar 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Still a problem

Hi,

I've been working on that sample application and am encountering the same problem. The page loads and gets stucks with "Loading..." displayed.

There are no entries in the database.

Were you able to find a solution to the problem?
Reply With Quote
  #7 (permalink)  
Old March 28th, 2009, 02:36 PM
Authorized User
 
Join Date: Mar 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default I also have set this up, downloaded code from two places

missing files...

Last edited by skydiver; March 28th, 2009 at 11:17 PM. Reason: missing files...
Reply With Quote
  #8 (permalink)  
Old March 30th, 2009, 11:48 AM
jminatel's Avatar
Wrox Staff
Points: 13,906, Level: 51
Points: 13,906, Level: 51 Points: 13,906, Level: 51 Points: 13,906, Level: 51
Activity: 11%
Activity: 11% Activity: 11% Activity: 11%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,833
Thanks: 51
Thanked 101 Times in 80 Posts
Default

skydiver and the author were able to work out what the problem was (a wrong json.js version) over in this other thread:

AJAXMail - is not working

and the updated code will be available on wrox.com tomorrow.
__________________
Jim Minatel
Associate Publisher
Wiley Technology Publishing
WROX Press
Blog: http://p2p.wrox.com/content/blogs/jminatel
Wrox online library: http://wrox.books24x7.com
Wrox on Twitter: http://twitter.com/wrox
Did someone here help you? Click on their post!
Reply With Quote
  #9 (permalink)  
Old March 30th, 2009, 11:54 AM
Authorized User
 
Join Date: Mar 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default No the problem was NOT solved yet

Thanks for posting this without even asking if the problem was solved. I think you should setup an AjaxMail and show this off to the world!!! I think everything you publish in a book should also have some samples on the web!

I will NOT purchase another book by these people!
Reply With Quote
  #10 (permalink)  
Old March 30th, 2009, 12:01 PM
jminatel's Avatar
Wrox Staff
Points: 13,906, Level: 51
Points: 13,906, Level: 51 Points: 13,906, Level: 51 Points: 13,906, Level: 51
Activity: 11%
Activity: 11% Activity: 11% Activity: 11%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,833
Thanks: 51
Thanked 101 Times in 80 Posts
Default

Shouting and rudeness are not necessary. Nicholas has been very patient in trying to sort out this problem and I apologize that I misinterpretted his replacement code as having fixed your problem.
__________________
Jim Minatel
Associate Publisher
Wiley Technology Publishing
WROX Press
Blog: http://p2p.wrox.com/content/blogs/jminatel
Wrox online library: http://wrox.books24x7.com
Wrox on Twitter: http://twitter.com/wrox
Did someone here help you? Click on their post!
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
AjaxMail looking for developers nzakas BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 August 25th, 2006 09:56 PM
What Setting r required for AjaxMail Earth BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 August 23rd, 2006 02:06 AM
AjaxMail Problem In function sendMail czarft BOOK: Professional Ajax ISBN: 978-0-471-77778-6 1 August 19th, 2006 04:14 PM
Error when sending mail using the AjaxMail example MightyThor BOOK: Professional Ajax ISBN: 978-0-471-77778-6 3 June 23rd, 2006 04:11 AM
CH 09 AjaxMail SQL coders4hire BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 June 22nd, 2006 08:03 PM



All times are GMT -4. The time now is 04:34 AM.


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