![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 681 Pomógł: 28 Dołączył: 14.08.2014 Ostrzeżenie: (0%) ![]() ![]() |
Witam, mam kod, po kliknięciu w przycisk, wyskakuje okienko dialog, potem mam ustawione 2 butony , po kliknięciu w "zapisz" pokazuje mi , że wartość nie istnieje, tak jakby nie przesyłało forma.
Kod: Kod $(document).ready(function(){
$("#OpenWindowEducation").click(function(e){ $("#EducationWindow").dialog({ height: 550, width: 640, left: 610, top:50, hide: "explode", buttons:{ "Zapisz": function(submit){ var form = $('#UpdateEducation'), formData = form.serialize(), formUrl = form.attr('action'), formMethod = form.attr('method'), responseMsg = $('#education-response'); responseMsg.hide().addClass('response-waiting').text('czekaj...').fadeIn(300); $.ajax({ type: formMethod, url: "update.php", data: formData, processData: false, //contentType: false, success: function(data){ var dataObject = jQuery.parseJSON(data); var responseData = jQuery.parseJSON(data), klass = ''; switch(responseData.status){ case 'error': klass = 'response-error'; break; case 'success': klass = 'response-success'; setTimeout(function(){ $('#sugesstionForm').dialog('close'); }, 1000); break; } responseMsg.fadeOut(200,function(){ $(this).removeClass('response-waiting').addClass(klass).text(responseData.message).fadeIn(200,function(){ setTimeout(function(){ responseMsg.fadeOut(200,function(){ $(this).removeClass(klass); }); },3000); }); }); console.log(data) } }); e.preventDefault(); //$( this ).dialog( "close" ); }, "Anuluj": function(){ $( this ).dialog( "close" ); } }, close: function(){} }); return false; }); }); Ten post edytował casperii 26.05.2015, 14:55:35 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 681 Pomógł: 28 Dołączył: 14.08.2014 Ostrzeżenie: (0%) ![]() ![]() |
Kurcze to masz może jakieś złoty środek ?
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 15.10.2025 - 20:03 |