ShowModalDialog Modal Open Subform, return the value to the parent window

xiaoxiao2021-04-07  343

Parent Page: A.ASPX where javascirpt scripts are as follows:

Function OpenData (Strurl)

//

ShowModalDialog

{Var aa = window.showModalDialog (strUrl, null, 'dialogWidth: 400px; dialogHeight: 100px; center: yes; status: no; dialogWidth: 400px; dialogHeight: 300px'); if (! Aa = null) {document.all .txt_send_email.value = aa}}

If you need to set txt_send_email's readOrthly to True, you need to add C # code:

TXT_SEND_EMAIL.ATITRIBUTES [

"

Readonly

"

]

=

"

True

"

;

Otherwise, if you set other places, you cannot read the value of txt_send_email JavaScript execution clicking button operation.

Document.getlementByid (

"

BTN_GET_VALUE

"

.click ();

//

BTN_GET_VALUE is the name of the button

The background C # program is as follows:

TXT_SEND_EMAIL.Attributes.add (

"

Ondblclick

"

,

"

OpenData ('frmchoose_userformail.aspx')

"

);

//

Where: txt_send_email is the TEXTBOX control Open subpage: frmchoose_userformail.aspx sub-page (Function: Implement the subpage, and return data):

String

strscr

=

"