-
2 Attachment(s)
window.close()
Using the Web Browser control, I have created a browser. As such the browser is working fine but there's a problem.
Many website make use of JavaScript to close a pop-up window. For e.g. window.close() or self.close(). Here's an e.g.:
Code:
<input type="button" class="button" value="Close Window" onclick="window.close();" />
Now what I find is when such a button or link is clicked in a web page, the web page closes but the Form still remains open. Have a look at the 2 images below. Note the Close this window button at the bottom in the 1st image. When I click this button, all I get to see is the 2nd image i.e. the entire Form doesn't close when the button was clicked; only the web page vanished.
How do I overcome this?
-
Re: window.close()
Is this an actual web page or a form within your VB webbrowser project?
-
Re: window.close()
First of all, sorry for the delayed response.
This is an actual web page; it's not a Form within the VB Web Browser project. For e.g. if you click the Manage Attachments button on the page where users type their question in this forum, a new window opens up. You will find a self.close hyperlink at the top & a window.close button at the bottom of this new window that opens up (the caption of both the hyperlink & the button is Close this window).