JSP refreshes the current page __jsp

Source: Internet
Author: User

Some time ago because the work is too busy, also did not write down, now share the download development finally to the problem and the solution.

Don't talk much, get to the point.

In the development, we feel that the book to refresh the current interface is a very easy thing, direct this.location.reload () is not good, but often some can not hit this effect, it is possible that the data refresh is not comprehensive (request operation, re-read the background data and jump to this page). It is possible that the original page on the basis of a new pop-up page (read data correctly), but the pop-up page is also very helpless.

Then check the data, found that said <base target= "_self" > can be resolved, and later added, or did not achieve the desired effect.

Then found a way, really in charge.

Add a hidden <a> tag to the interface and redefine the request address for the current interface.

<a id= ' reload ' href= ' <c:out value= ' ${ctx} '/>/workflow/flowprocesstpl/execute_task.fp?tasktplid=<c:out Value= ' ${tasktpl.id} '/> ' style= ' display:none ' ></a>

Then get the <a> tag object by document.getElementById ("Reload") in the defined function, and click on it.

  function Refreach () {
 	var Reload=document.getelementbyid ("Reload");
 	Reload.click ();
  }


You do not say, also really the steward, also does not eject the new page, the data reads from the backstage is also correct. I hope you can try this kind of problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.