How Can I Access Form Post Data From Jquery .submit() Event Object?
I need to access a hidden field named 'partnerId' in my form data from this js code: $(document).ready(function() { showPartnerSettings = function(e) { e.preventDefault();
Solution 1:
You're going to need to access it after it has been loaded into the DOM.
var $dialogForm = $("<div />")
.attr("id", "partner-settings-form")
.append($loading.clone())
.load(envPath + "/partner/settings?partnerid="+e.data.partnerId,
null,
function(){
/* access field here ... */
var field = $('#partnerId');
$("#partner-settings-form").css("display", "block");
}
).dialog({
title: "Partner Settings",
modal: false,
resizable: false,
width: 580, //CPB 04.11.13
position:['middle',130],
"close" : function(){
var dialogid=$(this).parent("div").attr("id");
$("#Tabs ul li."+dialogid).remove();
$(this).remove();
$("#alertmod").remove();
//$link.removeClass('preventclick');
},
})
.dialog("open")
.css("display", "block");
Post a Comment for "How Can I Access Form Post Data From Jquery .submit() Event Object?"