How to run JavaScript for HTTP Web Request ?

carmamir

Junior Member
Joined
May 8, 2011
Messages
120
Reaction score
9
I know how to get result of JS Window.OnLoad, but I have no idea how to run any other functions which running on POST method.

Example

Code:
script type="text/javascript">//<![CDATA[
replaceFormAction('form_post', dF('lxxt%297E%296J%296Jtmiv4hspsriospe2fpsk1644%3D2gsq%296Jehqmr2tlt%297Jgxvp%297Htswxw%296%3Axef%297Hihmx%296%3Afpsk%297H5','23'));addHiddenFields('form_post', {'auth[]':[['99g78g%3D%3Bkj8%3Bg%3E%3Ej6l%3C8ih6j8i%3E%63A%3C%3B%3A%3D',42],['9%40B%93D%3D%3B%3F%409%3C9Akmmj%3Com9nA%3Bj%3F%3Cl%3EABkl',6]]});//]]></script>
And the result is:
Code:
[TABLE]
[TR]
[TD]33a12a75ed25a88d0f62cb0d2c846547
[/TD]
[/TR]
[/TABLE]

[TABLE]
[TR]
[TD]079442670308bdda3fd0e82a63c589bc[/TD]
[/TR]
[/TABLE]
 
well its big pain in ass as far as i know.


It is, but it is possible, that's why I'm asking for other methods beside using JS host.

This code is executed only after post button is clicked so I don't know how to catch result of JS execution.

At this moment to run any JS I'm using host and then I can fetch result, but not in this case I know about other wrappers and I'm interested if any one here is using them and can recommend something ?
 
Ok issue solved. It turned out that JS function were using some other JS scripts embedded into file. Problem were lying in relative paths to those scripts :).
Solution, remember to provide always absolute links to all JS scripts you want to run :)
I've lost on this 2 days !
 
Ok issue solved. It turned out that JS function were using some other JS scripts embedded into file. Problem were lying in relative paths to those scripts :).
Solution, remember to provide always absolute links to all JS scripts you want to run :)
I've lost on this 2 days !

can you post your code?
 
This is a weird post, HTTPWebRequest is just a socket connection to port 80 or 443 (https). There is no such thing as running Javascript there, you need the Scripting Host ActiveX object or a WebBrowser control for these things..
 
It is difficult but I have a solution for you. You customized or designed your server by yourself but if it doesn't work then I have a code for this issue but can't post here.
 
How httpwebrequest can run javascript?? :O Surprising!!!
 
Back
Top