NET pop-up page Window Select return value _ Practical tips

Source: Internet
Author: User
Add "<base target=" _self "/>" to the page in the dialog box to be displayed Handling problems with postback pop-up new page

Main function Description:

Click a button in the page to pop a page window, select the pop-up page window value, close the window, the interface to get the value
Copy Code code as follows:

//b Interface Select value processing

<input type= "button" id= "Btnclose" value= "Confirm and close Window" O Nclick= "Closewin ()"/>

Function Closewin () {

//To upload the value of the B interface to the A interface
Window.returnvalue = Totalcou nt
Window.close ();
}
The//a interface needs to select a value
function showUnitDialog2 (id) {
var RDM = Math.random ();

//Open B interface
var result = window.showModalDialog ("goodsstocketacke.aspx?id=" + ID + "&t=" + RDM, "Counting Details", "D Ialogwidth=800px;dialogheight=500px;center=1 ");

//Accept the value of the B interface

if (result) {
$ (' #txtRealCount '). Val (result);
$ ("#txtRealCount"). attr ("ReadOnly", "true");
$ ("#tbUnit tr:eq (1) td:eq (3)"). HTML (result);
Initbutton ();
}
}

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.