jquery - Download a homepage where a POST argument is beeing generated from javascript -



jquery - Download a homepage where a POST argument is beeing generated from javascript -

did lot of research im sadly completly stuck.

i need download html page: fill out different info in formular , click submit button, save responses.

using firebug can see info filled out , send on post. unluckily there 1 more argument cannot trace downwards how generated, , without lastly argument don't adequate html response, error page.

wget , curl (cookies,useragent,header,referrer) fails without lastly parameter!

im not familiar jquery , javascript, cant info comes from, if browser knows should able well!

i found similar, mine seems harder field generated: wget : field info before sending post-data

in case traced downwards this:

<script type="text/javascript"> $(document).ready(function(){ $.get('/getmydata.asp?str=erservicexuvc',function(string){ $('#oikuzr').append('<input type="hidden" name="lsxuvp" value="'+ string +'">'); }); }); </script>

and difference using real browser , wget (even user agent , stuff) because cannot acces value, shows if utilize normal browser.

<input type="hidden" value="34928321" name="lsxuvp">

this value need (comparing firebug post)! but....

here knowledge ends.

cannot find "34928321" in code "#oikuzr" doesnt show in dom list of firebug, maybe i'm doing wrong (there thousands of entries) debugging above script can see string=34928321 local variable don't see function beeing called if open www.homepage.com/getmydata.asp?str=erservicexuvc (with or without params) there error page.

thought using splash proxy run javascript me, , wget page, since dont understand mechanics yet im doubtful.

so can do?

maybe javascript capable browser accepts commands command line: open, fillout, send, savehtml? alternatives? solutions wget (favorite!)?

i think phone call added prevent (or @ to the lowest degree create harder) doing trying do.

the trick in line:

$.get('/getmydata.asp?str=erservicexuvc',function(string){ .. });

this line performs ajax request. when request succeeds, callback function called, , response passed argument string.

so, though request, code generated, posted form. can't without inspecting actual environment, think ajax request depends on session (probably through cookie). without session, might generate error message instead.

so work around this, have page , cookies come it. then, when requesting code, utilize same cookies, server see request in same session.

this trick prevent abuse of form spambots. therefor, it's hard guess other tricks there might be, , else needed work.

javascript jquery html wget

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -