| |

VerySource

 Forgot password?
 Register
Search
View: 726|Reply: 2

ModalDialog cannot pop up a new window. When refreshing the parent window, the child window pops up automatically.

[Copy link]

4

Threads

10

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-1-18 08:20:01
| Show all posts |Read mode
There are two pages
1.userlist.aspx
2.user_info.aspx
I wrote in userlist.asp.cs
private void btn_Add_Click (object sender, System.EventArgs e)
{
Response.Write ("<script> javascript: window.showModalDialog ('user_info.aspx', '_ blank', 'scroll: 0; status: 0; help: 0; dialogWidth: 290px; dialogHeight: 165px') </ script> ");
}
When you click on the ammonium button, the child window appears. But the parent window has no content to display. What you want now is: when you open the child window, the parent window is also there.
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2020-1-23 17:09:01
| Show all posts
Response.Write ("") is written to this window, so there is no content, you can use this method
Page.ReGISterStartupScript ();

as follows :
Page.ReGISterStartupScript ("MsgSecretary", "JAVAscript: if (confirm ('Please confirm whether to delete this record!') == false) return false;")
Reply

Use magic Report

0

Threads

58

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-1-24 14:27:02
| Show all posts
Page.RegisterStartupScript ("ShowWindow", "<script> javascript: window.showModalDialog ('user_info.aspx', '_ blank', 'scroll: 0; status: 0; help: 0; dialogWidth: 290px; dialogHeight: 165px') </ script> ")
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list