Click to See Complete Forum and Search --> : view HTML source from another page


mister
10-01-2003, 05:36 PM
Hi,

Does anyone knows how to get the HTML code of another frame or directly from an URL?
Like getting the same response as right-clicking on "ViewSource". I have to handle an event based on another's page body content, that "another" page is a dynamic JSP.

Something like:
** if( <bodyContent>.indexOf("Yes") > -1) {...}

Can I do that using JavaScript?
If not, is there any way for doing it?

Thanks !

Charles
10-01-2003, 06:15 PM
You cannot do this with JavaScript but you can with Perl running on some server...

#!user/local/bin/perl
use CGI qw(param header);
use LWP::Simple;
print header('text'), get param 'url';

mister
10-01-2003, 06:48 PM
Thanks Charles! I don't know perl, but I'll try to find out how to do that!