Open a new browser window from embeded Internet Explorer

Posted by Buddy on Stack Overflow See other posts from Stack Overflow or by Buddy
Published on 2009-06-19T00:07:33Z Indexed on 2010/05/10 8:04 UTC
Read the original article Hit count: 307

I am working on a Windows desktop app (C++) that has an embedded Internet Explorer page. I'm working on the html page that is displayed in the There is not a back button control, so one of the requests is that links clicked on in the page should open the link in a browser window. It can open the link in the users default browser or in IE.

Is this possible? I realize that this is not possible because javascript is in a sandbox and cannot touch outside applications. I'm thinking there might be a way because it is using the IE.

I have tried the two methods that have worked for me in the past. Using jquery, I've tried these two approaches, but neither work in the app. They both work fine in normal browsers.

Using target="_blank"

 $( "a" ).attr( "target", "_blank" );

The other is using window.open:

 $( "a" ).click( function() {
   window.open( $( this ).attr( "href" ) );
 } );

I'm afraid that writing windows desktop applications is outside my area of expertise, so I cannot give more information regarding that side of the issue.

© Stack Overflow or respective owner

Related posts about Windows

Related posts about desktop