Window.Open opens a new blank page and does not automatically refresh the solution

Source: Internet
Author: User
Tags blank page

Call the JS method:

function buildpostform (FM, URL, target) {varE =NULL, El = []; if(!FM | |!URL)returne; Target= Target | |'_blank'; E=DOCUMENT.GETELEMENTBYID (FM); if(!e) {e= Document.createelement ('Form'); E.id=FM;    Document.body.appendChild (e); } E.method='Post'; E.target=Target; E.style.display='None'; E.enctype='application/x-www-form-urlencoded'; varIDX = Url.indexof ('?'); varPara = [], op = []; if(Idx >0) {para= url.substring (idx +1, Url.length). Split ('&'); URL= Url.substr (0, IDX);//intercepting URLs        varKeyPair = [];  for(varp =0; P < para.length; p++) {idx= Para[p].indexof ('='); if(Idx >0) {El.push ('<input type= "hidden" name= "'+ PARA[P].SUBSTR (0, IDX) +'"id=" frm'+ PARA[P].SUBSTR (0, IDX) +'"Value="'+ para[p].substring (idx +1, para[p].length) +'"/>'); } }} e.innerhtml= El.join ("'); E.action=URL; returne;}

It's done with this method of submission.

Call Method:

Buildpostform ('pay_form'_blank'). Submit ();

Window.Open opens a new blank page and does not automatically refresh the solution

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.