Title: How to set contentType of form Post by: nyr_jack on May 23, 2013, 01:27:15 AM I use method 'submit' of easyui form to asyc submit my form , but when success return, there is a pop window prompt to download, so I want to know need to set contentType for method 'submit'?
below is my codes: $('#updateUserForm').form('submit', { url:getContextPath() + '/base/user/updateUser', dataType:'text/html;encoding=UTF-8', success:function(data) { var data = eval('(' + data + ')'); if(data.resultType == "SUCCESS") { var node = $('#userTree').tree('find', 'USR_' + data.user.userFlg); $('#userTree').tree('update', { target:node.target, text:data.user.userName }); var panel = $('#userMainLayout').layout('panel','center'); panel.panel('refresh', getContextPath() + '/base/user/selectUserByFlg?userFlg=${user.userFlg}'); }else{ document.getElementById("validationErrors").innerHTML = data.validationErrors; } } }); Title: Re: How to set contentType of form Post by: stworthy on May 23, 2013, 06:22:59 PM Try set "Content-type:text/plain" in your php file.
|