What do I mean what do I suggest I see nothing wrong with it.
Do you want to change the HTML after getting the response? If it's that you
can do something like this:
{{extend 'layout.html'}}
<h2>Template default/test2.html</h2>
<dl>
<dt>Key</dt>
<dd id="key"></dd>
<dt>Key2</dt>
<dd id="key2"></dd>
</dl>
<script>
$(document).ready(function(){
$.ajax({
type: 'POST',
url:'http://127.0.0.1:8000/MFREG/default/test2.json',
contentType: "application/json; charset=utf-8",
data: {'key':'value','key2':'value2'},
dataType: 'json',
success: function(data){
for (var key in yourobject) {
if (yourobject.hasOwnProperty(key)) {
console.log(key, yourobject[key]);
}
}
}
});
});
</script>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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/d/optout.