Parameter pass resolution window.open session variable is missing

Source: Internet
Author: User
Tags variable window
session|window| variable | Solve |session|window with window.open open window, sometimes the session variable will be thrown away, to the ASP programming to bring some trouble. Resolve it with parameter passing:

<div id=cus_table style= "border-right: #000000 1px solid; Border-top: #000000 1px solid; Overflow:scroll; Border-left: #000000 1px solid; width:450px; Border-bottom: #000000 1px solid; height:150px; Background-color: #ffffff ">
Open function, placed between <script language= "JavaScript" >
<!--
function Openwindow (par,hang,lie,mterm,mweek,mlabname)
{
var pp,bhang,blie,req_week,req_term;
Pp=par;
Bhang=hang;
Blie=lie;
Req_week=mweek;
Req_term=mterm;
Req_labname=mlabname; window.open (' iptinfo.asp?qinqiu= ' +pp+ ' &qhang= ' +bhang+ ' &qlie= ' +blie+ ' &req_week= ', ' +req_week+ ') &req _term= ' +req_term+ ' &req_labname= ' +req_labname, ' Please enter relevant information ', ' height=200, width=320, Top=0, left=0, Toolbar=no, Menubar=no, Scrollbars=no, Resizable=no,location=no, Status=no ')
}
-->
</script>

The call to the function, put it where you think, I'm triggering it with the onclick

<a href=# Onclick=openwindow (' <%=session ("TeacherName")%> ', ' <%= (bhang+2)/4%> ', ' <%=blie-1%> ' , ' <%=lnd_term%> ', ' <%=lnd_week%> ', ' <%=sek_labname%> ') > Appointment </a>
</div>
Then in the iptinfo.asp can use request ("Qinqiu") to obtain the value of the session variable, the other parameters, like the request can be obtained, but it is said that the parameter passed the URL can not exceed 255, I seem to be more than the error tip: (



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.