如何使用ajax返回成功/失败消息?

I'm using MailChimp's API and I can successfully subscribe an email address by passing an email address to a specific URL. Once the email is submitted, MailChimp echoes a success or failure code.

Example: myurl.com/subscribe.php?email=example@gmail.com

What I need help with

My form isn't displaying the success/failure messages that I've based on MailChimps returned codes. What am I doing wrong?

http://jsfiddle.net/WarrenBee/c4MWX/

As long as I'm guessing on comments, I'll guess on an answer. I went to http://yoursite.com/subscribe/mcapi_listSubscribe.php?email=joe@joe.com in my browser. I got this:

Unable to load listSubscribe()! Code=220 Msg="joe@joe.com" has been banned

So, you've got a problem in your server-side code. It can't load a function named listSubscribe(). Also, regardless, you're not returning stuff in JSON format, but your ajax call is expecting such.

It's not working because the ajax operation is failing. You're trying to post to a URL in a different domain, and that particular server is not set up to allow that.