Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

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
0
rain_dew
Asked:
rain_dew
  • 2
  • 2
  • 2
1 Solution
 
ullfindsmitCommented:
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
0
 
rajeeshmcaCommented:
can u post your script
0
 
ullfindsmitCommented:
Below is the code from my VB file
RegisterClientScript("window.open('normalwindow.htm');window.close()","NewFancyScript",True)

Open in new window

0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

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

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

Try this
0
 
rain_dewAuthor Commented:
Adding <base target="_self" /> after <head> tags solves this issue.
0
 
rain_dewAuthor Commented:
ok
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now