| |

VerySource

 Forgot password?
 Register
Search
View: 604|Reply: 3

Hurry, ModalDialog cannot refresh!

[Copy link]

4

Threads

10

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 Invalid IP Address

Post time: 2020-1-23 14:20:01
| Show all posts |Read mode
There are two pages,
1.user_list.aspx.cs
2.user_info.aspx.cs
In the first page, I added an increase button. The code is as follows:
private void btn_Add_Click (object sender, System.EventArgs e)
{
Page.RegisterStartupScript ("ShowWindow", "<script> javascript: window.showModalDialog ('user_info.aspx', '_ blank', 'scroll: 0; status: 0; help: 0; dialogWidth: 290px; dialogHeight: 165px') </ script> ");
}
On the second page, I wrote:
Response.Write ("<script language = 'javascript'> window.dialogArguments.location.reload (true); alert ('Successfully added employees!'); Window.close (); </ script>");
But when you click the add button on the first page, the second page pops up. When you click the "Save" button on the second page, the first page cannot be refreshed, and the second page will not close. The "Cancel" button on the two pages cannot be closed. The closing code is as follows:
private void ImageButton2_Click (object sender, System.Web.UI.ImageClickEventArgs e)
{
Response.Write ("<script language: javascript> javascript: window.close (); </ script>");

}
Please frighten and give thanks, kneeling thank you!
I would like to ask a small question, how to verify the control pop-up dialog dialog box, thank you.
Reply

Use magic Report

2

Threads

7

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-2-6 20:30:01
| Show all posts
'user_info.aspx'

Add <base target = "_ top" /> in the head
Reply

Use magic Report

4

Threads

10

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-2-7 10:15:02
| Show all posts
An error occurred:
window.dialogArguments.location.reload is empty or not the object. How to solve it?
Reply

Use magic Report

0

Threads

10

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-8 12:15:01
| Show all posts
Response.Write ("<script language = 'javascript'> javascript: window.close (); </ script>");
Should be like this
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