| |

VerySource

 Forgot password?
 Register
Search
View: 626|Reply: 5

JS modal window question: Can I open another window in a closed window?

[Copy link]

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-3-5 12:30:01
| Show all posts |Read mode
I want to close the window in the modal window before opening another window:
Response.Write ("<script> window.returnValue = 1; alert (\" Success!\"); window.close (); window.showModalDialog ('SelMenuFM.aspx? MyID =" + myID + "&temp =" + DateTime .Now.ToString () + "',' selmenuwin ',' dialogwidth: 450px; dialogheight: 300px; edge: Raised; center: Yes; help: No; resizable: No; status: No; '); </ script> ");

As a result, it just closed without opening another window. How to change it?
Reply

Use magic Report

0

Threads

14

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-5-20 14:30:01
| Show all posts
The modal window cannot be opened. A modal window is not an independent window, it is part of the original window.
You can use window.open to open a new window
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-5-29 11:15:01
| Show all posts
up2u
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-6-10 18:45:01
| Show all posts
You can let the parent window open a modal window
Reply

Use magic Report

0

Threads

15

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 Japan

Post time: 2020-6-11 10:30:01
| Show all posts
Then make it in your main window (the one that opens the modal window)
if(returnValue==1)
{
window.showModalDialog('SelMenuFM.aspx?myID="+myID+"&temp=" + DateTime.Now.ToString()+" ','selmenuwin','dialogwidth:450px;dialogheight:300px;edge: Raised; center: Yes ; help: No; resizable: No; status: No;')
}
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-6-15 09:30:01
| Show all posts
Only did that.
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