in controller
from gluon.tools import Service
service = Service()
def call():
session.forget()
return service()
@service.json
def pullDataToMap():
...logic..
return result
result looks like this
{'San_Jose':102,'Paris':2,'London':38}
I am trying to call that function in javascript
so
<script>
$(document).ready(function(){
console.log("hi")
$.getJSON('https://test.corp.nam.com/test/default/call/json/pullDataToMap',
function(data) {
console.log(data);
});
});
</script>
it seems like it is not calling HTTPRequest and I am not getting any data.
Any thought?
Thank you in advance.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.