samedi 31 mai 2014

how to refresh page and keep pnotify


Vote count:

0




I made a POST form and i send data via ajax.and I use PNotify for alert the problem is how i refresh the page and keep the notify box.Or how I redirect the user after submit button to another page and notify box to remain? i try to put location.reload() in succes: function but not work...the notify is not displayed.



<script type="text/javascript">
var frm = $('#editticket');
frm.submit(function (ev) {
$.ajax({
type: frm.attr('method'),
url: frm.attr('action'),
data: frm.serialize(),
success: function (data) {
new PNotify({
text: 'Task edited.',
type: 'info',
hide: false
});
}
});

ev.preventDefault();
});
</script>


asked 20 secs ago






Aucun commentaire:

Enregistrer un commentaire