Click here to Skip to main content
15,922,533 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HI ,
i Have problme regarding popup in chrome previously i used to use windows.showmodaldialog which open the popup page and when i click submit it value show on the paents page without any postback

but now i m using window.open but it requires one postback to bind that data to parent page
Posted

Please check here

Window.showModalDialog() - Web APIs | MDN[^]

Think about it.
Quote:
Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.



and go through the following link

javascript - Why is window.showModalDialog deprecated? What to use instead? - Stack Overflow[^]
 
Share this answer
 
v2
It's not what you wrote Window.showModalDialog(). JavaScript is case-sensitive, so this what you wrote is wrong function name; besides this function has been deprecated:
Window.showModalDialog() - Web APIs | MDN[^].

Of course you can use window.open. I have no idea how it can be related to postback. Those functions are JavaScript functions, not related to server side activity at all.

However, using popup, in this sense of this word, is a bad idea. Not only it is inconvenient enough, but it is often blocked on the client side. The browsers' plug-ins blocking pop-ups are very popular, mostly because of annoying ads contaminating Web greatly.

In my article Modal Popup From Scratch[^] I discuss some better alternatives.

—SA
 
Share this answer
 

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



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