updated my ajax to the following but for somereason it just says something
went wrong
<script type="text/javascript">
$(document).ready(function() {
$('#get_info').submit(function() {
$.ajax({
type: "POST",
url: "/vmstatus/",
dataType: "json",
async: true,
data: {
csrfmiddlewaretoken: '{{csrf_token}}',
selected_customer: $('selected_customer').val()
},
success: function (json) {
console.log('done');
setInterval(returnData, 5000);
console.log(json);
},
error: function(json) {
console.log('something went wrong');
console.log(json);
}
});
return false;
});
});
var returnData = function () {
$.ajax({
type: "POST",
url: "/vmstatus/",
dataType: "json",
async: true,
data: {
csrfmiddlewaretoken: '{{csrf_token}}',
selected_customer: $('selected_customer').val()
},
success: function (json) {
console.log('done');
console.log(json);
},
error: function(json) {
console.log('something went wrong');
console.log(json);
}
});
};
</script>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/6d192f9a-7128-405e-87ce-785589f09b80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.