javascript - How can I access form POST data from jQuery .submit() event object? -
i need access hidden field named 'partnerid' in form data js code:
$(document).ready(function() { showpartnersettings = function(e) { e.preventdefault(); var $dialogform = $("<div />") .attr("id", "partner-settings-form") .append($loading.clone()) .load(envpath + "/partner/settings?partnerid="+e.data.partnerid, null, function(){ $("#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"); return false; };
is there way retrieve value event object passed showpartnersettings()
?
you're going need access after has been loaded 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");
Comments
Post a Comment