• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • 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
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

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