execute JavaScript
I have a page that I need to login to and have the login page figured out but there is a page sitting in-between the login page and the secured home page. When I login with the browser this in-between page is submitted automatically with JavaScript.
<script language="javascript">window.setTimeout('document.forms[0].submit()', 0);</script>
But If I login with Screen-Scraper it never gets past this page. I tried extracting the data from the only 2 hidden form fields and submit it myself with screen-scraper but that does not work either.
I am clueless on what to do next. I can use help. Please let me know what else you may need from me to help you help me.
Thanks,
Patrick
problem with login pretty asp form
i have submit a login form, after submit in response another form is load and automatically submitted with dynamic token number.
after post that dynamic number i can scrape account page data.
but i can't got this auto submit form value and page.
is there any way to fetch second auto submitted form values.
Please help me.
Thanks
Damodar
The means to do this will
The means to do this will depend on the redirect used. It they're using a HTTP redirect, screen-scraper will run it automatically. This also means that the site can't do much on that intermediate page (like run JavaScript) so that's not likely the case.
More likely they are using JavaScript, and screen-scraper won't follow that automatically. You will request the page, and get back the HTML with the JavaScript. I would think you need to scrape this dynamic number you need, and emulate what the script is doing with it--be it putting in the URLs or setting a cookie.
Patrick, The trick is to as
Patrick,
The trick is to as closely as possible imitate the requests made by the browser. So, in your proxy transactions can you see the request that is being made by JavaScript you cited?
Does your manual submission of the form within screen-scraper look exactly like the request from the proxy?
A good way to test this is to use the "Compare with proxy transaction" button under the Last Request tab of your scrapeable file (available in Professional and Enterprise Editions -- click for free trial!).
-Scott