Webbrowser opens link in the same window

F

FUnky

Hi All,

I use the AxWebBrowser control to display HTML pages in my application (.Net
1.1).
Now the problem is, if my HTML page contains a web link and i click on that
link, the corresponding webpage opens up in the same control.
I require it to open a new instance of IE and open up there, leaving my
webbrowser control with my HTML page as such.

Is there a way to do this ?

PS : Similarly, if the link was to a file on my local hard disk, I need the
appropriate application to open up (something like Process.Start) in a new
window.

Thanks in advance.

FUnky
 
N

Norman Yuan

That is how Web browser/IE should behave. If you want to open a new
browser/IE winodw, you need to have client-side script (javascript) to open
a new browser window in responding to the link click. That is, add some
javascript in your HTML page, like

var win;
win=window.open("http://server/thePage.html");
win.focus();

and than have the link clicking to execute this piece of code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top