fetch HTML page content from the web ( by executing javascript ) using stand alone
HI
i need some help with the following problem:
i need to fetch HTML page content from the web using stand alone Java class
the problem is that the page i want to fetch don't have DIRECT URL and can be reach only from other page by executing javascript code
the base ur is : Passenger Information - Online Flights
and the java script that should be executed exist on "All flights" link
for summery i need to access the fist page from stand alone java class execute the js function and get the result HTML as String
any one can help?
hope it's clear , if not please feel free to ask for more info
Thanks
Re: fetch HTML page content from the web ( by executing javascript ) using stand alon
Cross posted at fetch HTML page content from the web ( by executing javascript ) using stand alone .
Crossposting is not against the rules of this forum, but we ask to provide links to other locations the question was asked. For reasons, see The problems with crossposting
Re: fetch HTML page content from the web ( by executing javascript ) using stand alon
Hey johny,
This is interesting. How far have you got?
I will have a play with it and get back to you.
Re: fetch HTML page content from the web ( by executing javascript ) using stand alon
Quote:
Originally Posted by
JavaPF
Hey johny,
This is interesting. How far have you got?
I will have a play with it and get back to you.
im still tin the beginning , didn't manage to execute the js and The HTML back.
hope you can help me
Re: fetch HTML page content from the web ( by executing javascript ) using stand alon
My plan was to download the .js files from the server and then look to see what the executed function does.. This might give a clue as to how to move forward.
Re: fetch HTML page content from the web ( by executing javascript ) using stand alon
Quote:
Originally Posted by
JavaPF
My plan was to download the .js files from the server and then look to see what the executed function does.. This might give a clue as to how to move forward.
this is the called method : javascript:__doPostBack('lnkShowGridWithPaging','' )
and this is the source code of the method
Code Javascript:
<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
this is the only place in all files ( in the HTML file) i found the method , but it's commented out
please advice
Thanks
Re: fetch HTML page content from the web ( by executing javascript ) using stand alon
Can you post the entire .js file please
I'm interested in eventTarget
1 Attachment(s)
Re: fetch HTML page content from the web ( by executing javascript ) using stand alon
Quote:
Originally Posted by
JavaPF
Can you post the entire .js file please
I'm interested in eventTarget
the files are attached