Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
5.00/5 (11 votes)
See more:
Hi
Following code is working fine in following browser:

  • IF
  • Mozilla
  • Safari

but it is not working in
  • Google Chrome 5.0.3

C#
var returnValue = window.showModalDialog("popup.aspx?", "window", "dialogWidth:390px;dialogHeight:180px;scroll:no;");
    }


Your answer will be appreciated!

Thanks,
Imdadhusen
Posted
Comments
Svetlin Panayotov 21-Sep-10 7:15am    
Sadly, yes. Last time I tried using showModalDialog it worked in Chrome, but the same way window.open works - the window was not modal. It won't work in Opera as well, so the only thing that comes to mind is using Jquery UI's Dialog.
Suk@nta 8-Jan-14 3:56am    
yes i have also tried it in one of my project .it will work..
Sandeep Mewara 21-Sep-10 13:41pm    
Try jQuery dialogs...

I found Google has (had) some issues with the showModalDialog. You can follow the status of the problem right here[^].

Good luck!
 
Share this answer
 
Hi,

You are right window.showModalDialog() doesn't work with the latest updated version of Google Chrome, i too faced this problem in my project.

You can have a number of solutions for that :-

1. The easiest one is window.open();

Pros:- Easy to handle and use.
Cons:- You can still work on the parent page while the pop-up window is opened.

2. The Efficient solution is to use jQuery dialog control.
For better understanding of jQuery dialog control you can refer the
link "http://jqueryui.com/dialog/[^]"


Thanks.
 
Share this answer
 
v2
i do it one of my project .it will work .i think theire might be some issue..try again

JavaScript
window.showModalDialog("popup.aspx?", true, 'dialogHeight:150px;dialogWidth:500px');
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900