Link to home
Start Free TrialLog in
Avatar of rain_dew
rain_dewFlag for United States of America

asked on

showModalDialog box

I am using showModalDialog for opening of popup from VB.net web application. When user submits from showModalDialog window, it should get closed.

For this purpose in my javascript function I have used window.close().

But when user clicks submit button on showModalDialog window, another similar window opens up (which is a nowmal window..not showModalDialog).

How to resolve this issue
Avatar of ullfindsmit
ullfindsmit
Flag of United States of America image

you can do a window.open and open the normal window you would like to open

after the line (and only after that line ) you should close the window the way you do it today
can u post your script
Below is the code from my VB file
RegisterClientScript("window.open('normalwindow.htm');window.close()","NewFancyScript",True)

Open in new window

For the button in the normalwindow.htm, call the javascript as

<input type="button" onclick="javascript:self.close()" />

Try this
ASKER CERTIFIED SOLUTION
Avatar of rain_dew
rain_dew
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rain_dew

ASKER

ok