Looking at your Request.JSON code below, I don't see any glaring errors. This is the kind of thing that you'll have to debug yourself. Log out the various arguments you are passing (like the url) and verify that. Wrap the statement in a try/catch and log the error (firebug doesn't always show these on its own). If that fails, open the mootools.js file in your environment and add some log statements in the Request and Request.JSON classes themselves.
On Tue, Jan 26, 2010 at 10:22 AM, Valerio Schiavoni < [email protected]> wrote: > Hello everyone, > i'm a completly newbie with mootools. And with javascript in general i'm > not that an expert, so forgive my possible mistakes. > > I've developed a simple script which uses jsolait [1] to send JsonRpc [2] > requests to a remote web-server. > Due to various reasons (jsolait is now discontinued and it's made of 3 > different files, mootools is more easy to distribute and actively developed, > it supports a larger variety of browsers, etc), I'm trying to port my code. > > Consider this small snippet of code using jsolait: > > var serviceURL = "http://localhost:8080/" > var methods = ["store"]; > jsonrpc = imprt("jsonrpc"); > service = new jsonrpc.ServiceProxy(serviceURL, methods); > var result = service.store("bla bla"); > > Now, if I want to port this code, I tried this: > > var jsonRequest = new Request.JSON({url: serviceURL, onSuccess: > function(result){ > alert("result:"+result);}}).post({'method': 'store', 'params': 'bla > bla'}); > > But, for some reasons, the web-server doesn't even receive the request. Am > I missing something? > I'm doing my tests with the latest mootools (ver 1.2.4). > > Thanks, > Valerio > > [1] http://jsolait.net/ > [2] http://json-rpc.org/ > >
