Page 1 of 1

javascript post backs

Posted: Wed Dec 28, 2011 4:43 pm
by jpnilsson
Thank you first of all for a great product. I am trying to navigate a page which uses aspx and saves the active states using the built-in tools that aspx rely on. In order to get to the 'next 20' items in the database, the architecture uses javascript to postback a number of values. Is there an example somewhere where I can see how this is achieved using the scripting? Thank you!

Re: javascript post backs

Posted: Wed Dec 28, 2011 4:54 pm
by Support
Yes, kind of. This kind of site is the hardest to scan. What I do is use our packet sniffer to trap the POST command so I can see which paramters it sends. Then I do something like this...

Code: Select all

Link = New(URL);
Form = New(Submit);

Form.SetValue('__EVENTTARGET', 'btnSearch');
Form.SetValue('__EVENTARGUMENT', '');
Form.SetValue('__VIEWSTATE', WildGet(Link.Data, 'name="__VIEWSTATE" value="([^"]*)"'));

Link.Location = 'Post URL';
If you can let me know the URL (via email if you like) then I can get you the exact code to navigate to the next 20 items.