Results 1 to 4 of 4

Thread: Javascript:__doPostBack

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    1

    Javascript:__doPostBack

    Hi all, and I am new to here.
    I would like to ask if I wanna download a page from the following url
    http://iypsearch.yp.com.hk/iypbusine...e&classid=1337
    Some of the links are in Javascript:__doPostBack() form
    I want to ask whether it is possible to get the real url of that page or can I write a window application to get the pages by Javascript:__doPostBack()?

    It is quite urgent and Thank you for your help...

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  3. #3
    New Member
    Join Date
    Oct 2009
    Posts
    7

    Re: Javascript:__doPostBack

    So how do you click that link?

  4. #4
    New Member
    Join Date
    Oct 2009
    Posts
    7

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width