Ok I got the problem. Basically you are getting a response as JSON text. You need to convert this into a JSON object before you deserialize it as below:
$.ajax({url:"/load.lasso",
type:"GET",
complete: function(data){
var jsondata={};
eval("jsondata = "+data);
$("form#editform").deserialize(jsondata);}
});
This should work. I've added an example to illustrate this on the plugin page:
http://www.reach1to1.com/sandbox/jquery/testform.html
Let me know if this works.
Regards
Ashutosh
On 9/7/06, Tom Wiebe <[EMAIL PROTECTED]
> wrote:
Hi there, greetings from Canada.
I'm trying to use your deserialize plugin with Jquery to populate a
form from an external url. The plugin works great when I supply it
hard coded json, as in your examples but, I can't for the life of me
figure out how to make it work as a callback function within a $.get
or $.ajax call.
It would seem to me that something along these lines should work but,
it isn't:
$.ajax({url:"/load.lasso",
type:"GET",
complete: function(data){$("form#editform").deserialize
(data);}
});
Have I got this all wrong? I'm new to JQuery and far from an expert
in _javascript_.
Thanks,
Tom Wiebe
Vancouver, Canada
--
Reach1to1 Communications
http://www.reach1to1.com
[EMAIL PROTECTED]
98201-94408
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/