Bob.
Thanks for help. I tried both suggestions and still got apparently
the same error.
Here is send_data with your suggestion....
function send_data() {
var d = doXHR("/chat/print_data",
{method : "POST",
sendContent : queryString({"apple" :
"orange"}),
'Content-type': 'application/x-www-form-
urlencoded'
});
d.addCallback(success_handler);
d.addErrback(failure_handler);
}
Here is new TurboGears controller....
@turbogears.expose()
def print_data(self, apple):
open("/output_file", "w").write(apple)
Here is what looks like same error...
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/
cherrypy/_cphttptools.py", line 121, in _run
self.main()
File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/
cherrypy/_cphttptools.py", line 264, in main
body = page_handler(*virtual_path, **self.params)
TypeError: print_data() takes at least 2 arguments (1 given)
2008-01-21 13:16:33,851 turbogears.access INFO - - "POST /chat/
print_data HTTP/1.1" 500 791 "" "Mozilla/5.0 (X11; U; Linux i686; en-
US; rv:1.8.0.13pre) Gecko/20071022 Ubuntu/dapper-security Firefox/
1.5.0.13pre"
Any help still greatly appreciated.
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---