EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
October 03, 2025, 08:20:47 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
How to set contentType of form
Pages: [
1
]
« previous
next »
Print
Author
Topic: How to set contentType of form (Read 11068 times)
nyr_jack
Newbie
Posts: 31
How to set contentType of form
«
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;
}
}
});
«
Last Edit: May 23, 2013, 01:41:46 AM by nyr_jack
»
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: How to set contentType of form
«
Reply #1 on:
May 23, 2013, 06:22:59 PM »
Try set "Content-type:text/plain" in your php file.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...