当时的想法是:

  上传一个文件成功后 刷新navTab ,关闭上传文件dialog.

function fileNameBack(args){
  //表单毁掉函数 alertMsg.correct(args["msg"],null); navTab.reloadFlag("main");//navTab的名称 $.pdialog.closeCurrent(); }
<form action="" method="post" enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return iframeCallback(this, fileNameBack)">

</form>

 

args是后台返回的json字符串:

  后台方法

DWZ 在js中刷新某个navTab
    JSONObject resultJson = new JSONObject();
    resultJson.put("msg","成功!");
    context.sendAsString(resultJson.toString());


public void sendAsString(String s,String... encoding) {
        String charset = "UTF-8";
        if(encoding.length==1){
            charset = encoding[0];
        }
        response.setContentType("text/html; charset="+charset);
        response.setHeader("Cache-control", "no-cache");
        response.setCharacterEncoding(charset);
        try {
            response.getWriter().write(s);
        } catch (IOException e) {
            throw new RuntimeException("response write json error.info: " + e.getMessage());
        }
    }            
DWZ 在js中刷新某个navTab

 

相关文章:

  • 2022-12-23
  • 2021-08-03
  • 2021-11-13
  • 2021-09-22
  • 2021-05-03
  • 2022-12-23
  • 2021-09-16
猜你喜欢
  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案