Ricky Wang


I utilize SHDocVw.InternetExplorerClass as an agent to retrieve content of web pages. For some pages, I need to login to get access to resource further. The problem is that the mechanism to post the authentication is through a javascript within the src attribute of <a> element, like <A href="javascript:login();">.

Although I know I can get HTMLAnchorElement with InternetExplorerClass representing <A> in IE, I am not sure if I can direct trigger the javascript within <A> with the off-the-shelf API of HTMLAnchorElement.

Any help or suggestion is much appreciated.



Re: Internet Explorer Extension Development The problem of executing javascript within a.src with SHDocVw.InternetExplorerClass

Adrian Dorache

Try to call IHTMLElement :: click method on anchor element. That should do it.