EasyUI Forum
October 03, 2025, 08:23:29 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to set contentType of form  (Read 11069 times)
nyr_jack
Newbie
*
Posts: 31


View Profile
« 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


View Profile Email
« Reply #1 on: May 23, 2013, 06:22:59 PM »

Try set "Content-type:text/plain" in your php file.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!