Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Webpy with jQuery for AJAX
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dexter  
View profile  
 More options Sep 28 2011, 1:28 pm
From: Dexter <sci.cr...@gmail.com>
Date: Wed, 28 Sep 2011 10:28:31 -0700 (PDT)
Local: Wed, Sep 28 2011 1:28 pm
Subject: Webpy with jQuery for AJAX
Hi

Have been trying to implement some AJAX using jQuery.
Have referred to this for some directions
http://kooneiform.wordpress.com/2010/02/28/python-and-ajax-for-beginn...

Basically what I want to do is as a proof of concept is receive some
data from a server and display it on a page.

Server side file simply returns "Ajax Data" when called with POST

code.py
-----------------------------

class tabs:
        def POST(self,*args):
                return "Ajax Data"
--------------------------------------------------------

Client Side - The code below should receive "Ajax Data" text from
server after clicking #button and display it in sandbox area which is
a div
--------------------------------------------------------
jQuery("#button").click(function() {
    $.ajax({
            type: 'POST',
            data: 'dummy'
            success: function(data) {
                alert(data); /*Debugging Statement*/
                jQuery('#sandbox').html(data);
            },
    });
    return false;

});

However nothing happens. When I added an alert to see what is being
returned. The alert Box displays
[object XMLDocument] while I was expecting a string.

What did I do wrong ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dexter  
View profile  
 More options Sep 28 2011, 3:09 pm
From: Dexter <sci.cr...@gmail.com>
Date: Wed, 28 Sep 2011 12:09:33 -0700 (PDT)
Local: Wed, Sep 28 2011 3:09 pm
Subject: Re: Webpy with jQuery for AJAX
Solved.
Firefox was treating the reply as XML
Added web.header("Content-Type", "text/plain")
and issue gone :)

On Sep 28, 10:28 pm, Dexter <sci.cr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce Eckel  
View profile  
 More options Sep 29 2011, 1:43 pm
From: Bruce Eckel <brucetec...@gmail.com>
Date: Thu, 29 Sep 2011 11:43:22 -0600
Local: Thurs, Sep 29 2011 1:43 pm
Subject: Re: [webpy] Webpy with jQuery for AJAX

I'll be publishing a web post on this very subject in the next couple of
days. I'll put a link to it on this group when I do.

-- Bruce Eckel
www.Reinventing-Business.com
www.MindviewInc.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce Eckel  
View profile  
 More options Sep 30 2011, 6:03 pm
From: Bruce Eckel <brucetec...@gmail.com>
Date: Fri, 30 Sep 2011 16:03:03 -0600
Local: Fri, Sep 30 2011 6:03 pm
Subject: Re: [webpy] Webpy with jQuery for AJAX

Here's the article:
http://www.artima.com/weblogs/viewpost.jsp?thread=335549

-- Bruce Eckel
www.Reinventing-Business.com
www.MindviewInc.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
michael kapelko  
View profile  
 More options Sep 30 2011, 11:03 pm
From: michael kapelko <korn...@gmail.com>
Date: Sat, 1 Oct 2011 10:03:20 +0700
Local: Fri, Sep 30 2011 11:03 pm
Subject: Re: [webpy] Webpy with jQuery for AJAX
Very nice article.
I always wondered how to make a user application with web interface,
and it's just webbrowser module!
There's one misprint where you refer to num as sum: "... while sum is
generated with JavaScript's random number generator ...".

PS.

I've just read you're Bruce Eckel who wrote "Thinking in C++". It was
very nice, I started with it! I must say it's the only book I've read
most completely about C++ :)
I also remember reading "Thinking in Java" when I had a course about
Java if I'm not mistaken.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce Eckel  
View profile  
 More options Oct 1 2011, 8:28 am
From: Bruce Eckel <brucetec...@gmail.com>
Date: Sat, 1 Oct 2011 06:28:56 -0600
Local: Sat, Oct 1 2011 8:28 am
Subject: Re: [webpy] Webpy with jQuery for AJAX

Thanks for the typo fix!

-- Bruce Eckel
www.Reinventing-Business.com
www.MindviewInc.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
redfish  
View profile  
 More options Oct 29 2012, 10:13 pm
From: redfish <lvren...@gmail.com>
Date: Mon, 29 Oct 2012 19:13:29 -0700 (PDT)
Local: Mon, Oct 29 2012 10:13 pm
Subject: Re: [webpy] Webpy with jQuery for AJAX

good job .very nice article. It solves my problem

在 2011年10月1日星期六UTC+8上午6时03分03秒,Bruce Eckel写道:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »