简体   繁体   中英

Pass value from parent window(client side value) to popup window in master page

In master page footer

<asp:LinkButton ID="lnlcontact" runat="server" OnClientClick="return PopupFeedback()">Contact admin/Feedback</asp:LinkButton>

Popup window open function

function PopupFeedback() {

            var currentURL = window.location.href;          
            //alert(currentURL);
                window.open('/PopupFeedback.aspx', "_blank", "WIDTH=650,HEIGHT=500,scrollbars=yes, menubar=no,resizable=yes,directories=no,location=no", "PopupFeedback");       

            return false;
        }

I got current page url, trying to send url to popup window from the screen user clicks contact. Any help is greatly appreciated.

Your question is not clear, is this what you need

function PopupFeedback() {    
            var currentURL = window.location.href;          
            window.open('PopupFeedback.aspx?myvar='+currentUrl, "_blank", "WIDTH=650,HEIGHT=500,scrollbars=yes, menubar=no,resizable=yes,directories=no,location=no", "PopupFeedback");      
            return false;
        }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM