showmodaldialog

javascript - showModalDialog not returning value in Chrome

与世无争的帅哥 提交于 2019-11-27 01:36:04
I made a small calendar popup in Javascript. Very simple, using the Calendar control from ASP.NET. I call the popup window with showModalDialog. In the modal window, changing the current month of the calendar causes problems because of the postback, and I found in several places that the solution is to put: <base target="_self"/> in the head part of the aspx file. Everything works great... except for one thing, and only in Google Chrome. To get back the selected date, I set the returnValue of the popup to the date selected in the calendar. In IE and Firefox, it always works. In Chrome, however

Why is window.showModalDialog deprecated? What to use instead?

£可爱£侵袭症+ 提交于 2019-11-26 18:58:01
I was developing a GreaseMonkey script which used window.showModalDialog . But before finishing it, I have discovered that Firefox 29 warns: Use of window.showModalDialog() is deprecated. Use window.open() instead. For more help https://developer.mozilla.org/en-US/docs/Web/API/Window.open But the problem is that window.open needs UniversalBrowserWrite privilege in order to open a modal window using window.open . Then, why is window.showModalDialog deprecated? Is there any API which doesn't require privileges? Note : I don't want a fake modal dialog (like jQuery's one), I need a real modal

javascript - showModalDialog not returning value in Chrome

别来无恙 提交于 2019-11-26 09:43:03
问题 I made a small calendar popup in Javascript. Very simple, using the Calendar control from ASP.NET. I call the popup window with showModalDialog. In the modal window, changing the current month of the calendar causes problems because of the postback, and I found in several places that the solution is to put: <base target=\"_self\"/> in the head part of the aspx file. Everything works great... except for one thing, and only in Google Chrome. To get back the selected date, I set the returnValue