Re: Javascript:__doPostBack
Looking at that page, it seems like the only links that require a postback are the paging links (which is quite stupid as you would want a search engine to be able to go through all the pages. How difficult is it to distinguish between a hyperlink and a linkbutton? And these are the Yellow Pages, for the love of god!)
Anyways, I looked at some of those links and it appears that they're getting the links (the paging links) to do a POST back to the same page, and then the page doesn't even redirect, it does a Server.Transfer.
So this effectively means that when you access that URL directly via GET, you will get page 1, but to get page 2, you will need to POST to the same page, with the same GET parameters and set the __EVENTTARGET value to iPage1 for example. Whenever you see a _doPostBack method call, the first argument becomes __EVENTTARGET.
Re: Javascript:__doPostBack
So how do you click that link?
Re: Javascript:__doPostBack
Here is the page URL that has a link in it I am trying to click on:
http://guggenheiminvestments.com/pro.../wfvk/holdings
I open this page in WebBrowser1.
The link within this page is:
javascript:__doPostBack('p$lt$zoneMainContent$pageplaceholder$pageplaceholder$lt$zoneCenter$ETFHoldi ngsWidget$Export','')
Here is the code I am using in VB6 that I am trying to use to click on the link (does not work):
WebBrowser1.Document.parentWindow.execScript "javascript:__doPostBack('p$lt$zoneMainContent$pageplaceholder$pageplaceholder$lt$zoneCenter$ETFHold ingsWidget$Export','')"
I then need to save the page.
Help is appreciated. Thank you.