or you call it with .json extension and use the generic json view url: /test01/default/getContent*.json*?sourceTitle=x
or you do this on the return import json def getContent(): titleArg = str(request.vars.sourceTitle) print "--------------------------------------" print "--------------------------------------" print request.vars # Starts working if "contentType" in ajax request above is commented print "Getting news content for : " + titleArg print "--------------------------------------" print "--------------------------------------" #rows=db(db.NewsMaster).select(db.NewsMaster.ALL) """ """ myobj = [dict(value=x),dict(value=x), dict(value=x)] return json.dumps(myobj) On Wed, Sep 5, 2012 at 6:51 PM, Nik <nikhil.kodil...@gmail.com> wrote: > Thanks Bruno ! > That worked, but now when I get the response back as JSON, JQuery throws > an error saying the JSON isn't valid. The JSON seems valid to me & also > passes JSONLint test : > > {"readyState":4,"responseText":"FIFA support India for U-17 and 2022 World > Cup - Times","status":200,"statusText":"OK"} > > > > On Wednesday, 5 September 2012 17:40:42 UTC-4, rochacbruno wrote: >> >> Your URL should have the vars >> >> url: /test01/default/getContent?**sourcetitle=xxx >> >> If you do not pass the vars on url you can't get them at the called >> controller >> > -- > > > > --