1

When a web page i have loaded in to my WebBrowser1 opens a link, it opens it outside the scope of the app so it creates a new session it seems and no cookie or login info is remembered. The user have to relog in the new popup window.

In my WebBrowser1 i load a page that have a link that calls a java script function with this call

<a href="#" onclick="javascript:stats('155916','0');">stats</a>

the java script function is this

// <![CDATA[
function stats(portRowId, action) 
{
    var w, wname = 'waiting';
    w = window.open('/router.do?method=stats&action=' + action + '&portId=' + portRowId,wname);
}

// ]]>

is it possible to intersept this call and make it open the /router.do?method=stats&action= link inside the scope of the webbrowser1 so the user don't have to re-log in the new window?

i dont have access too the source of the web page so i cant change the "<a ref" or the java script function

Alex Mendez
  • 5,120
  • 1
  • 25
  • 23
Darkmage
  • 1,583
  • 9
  • 24
  • 42
  • This does not look like c# to me. It looks like javascript an java as the url that you are using is a .do page. – Alex Mendez Apr 25 '12 at 12:11
  • @Alex the C# app controller WebBrowser is calling a site that contains that source,,, the app is c# the site is ofc html and javascript – Darkmage Apr 25 '12 at 12:15
  • The "/router.do?...", is that asp.net or is it an external website? Do you have the code for it and if so, can you show it? – Alex Mendez Apr 25 '12 at 15:53
  • this was the solution for this problem. http://stackoverflow.com/questions/175836/system-windows-forms-webbrowser-open-links-in-same-window-or-new-window-with-sam – Darkmage May 04 '12 at 12:44

0 Answers0