Avoid URL value string Sjstr too long, use the From form "hide field" post submission

Source: Internet
Author: User

1. Normal URL pass-through value
-----------------------------
JS Code:
1     //page loading automatic pagination2 $ (function () {3         //var url = "${pagecontext.request.contextpath}/iwell.disposition.sgt_1.0/newallsgtdata.action?jh=${jh}& SJSTR=${SJSTR} ";4$ (' #tt '). Pagination ({5Total: ${total},showrefresh:false, pagesize:${rows},pagenumber:${page},6 onselectpage:function (pagenumber, pageSize) {7$ ("#pageSize"). Val (pageSize);8$ ("#pageNumber"). Val (pagenumber);9$ ("#urlPost"). Submit ();Ten                 //window.location.href = url+ "&rows=" +pagesize+ "&page=" +pagenumber; One             } A         }); -$ (' #tt1 '). Pagination ({ -Total: ${total},showrefresh:false, pagesize:${rows},pagenumber:${page}, the onselectpage:function (pagenumber, pageSize) { -$ ("#pageSize"). Val (pageSize); -$ ("#pageNumber"). Val (pagenumber); -$ ("#urlPost"). Submit (); +                 //window.location.href = url+ "&rows=" +pagesize+ "&page=" +pagenumber; -             } +});

2. Target of IFrame and form simple application from form hidden field submission

1 <!--  hidden domain post submission URL--2 <form id= "Framesurl" target= "frame_s" action= "${ Pagecontext.request.contextpath}/iwell.disposition.sgt_1.0/newallsgtdata.action "method=" POST "style=" Display: none; " >3             <input type= "hidden" name= "JH" value= "${jh}"/>4             5 </form>
<!--Draw indicator diagram iframe--                 <iframe id= "frame_s" name= "frame_s" frameborder= "0" style= "width:100%;height:100%;" ></iframe>            <!--end--

Js

1 function Changesgt (s) {2         //Avoid URL string s being too long, use hidden domain post submission (where the name attribute in the IFRAME corresponds to the value of the target property in the From form)3$ ("#sjstr"). Val (s);4         //Alert ($ ("#sjstr"). Val ());5$ ("#frameSURL"). Submit ();6         //alert (s);7         //$ ("#frame_S"). attr ("src", "${pagecontext.request.contextpath}/iwell.disposition.sgt_1.0/ Newallsgtdata.action?jh=${jh}&sjstr= "+s);8}

Avoid URL value string Sjstr too long, use the From form "hide field" post submission

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.