[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting back Page Source View rather than actual page display.
Here's what I'm trying to solve.
Google Maps exports some functionality only through Javascript. I'm
trying to invoke a page from HTTPAPI, execute some JavaScript, and
retrieve page after JavaScript draws its results onto the page.
----------------------------------------------------------------------
------------
Here's a test php -- JSTest.php
<html>
<head>
<script>
function wumboize() {
document.getElementById('result').innerHTML =
'wumbo' ;
}
</script>
</head>
<body onload="wumboize()">
<?= date("H:i:s") ?>
<div id='result'>fish</div>
</body>
</html>
Here's what I see when I invoke localhost/JSTest.php in a browser
15:09:16
wumbo
Here's a snippet from an RPG program calling the page
c eval url = 'http://10.10.2.92/' +
c 'ajaxBackend/' +
c 'JSTest.php'
c eval file = '/tmp/testJSget.txt'
c eval rc = http_url_get(url:file)
c callp cmd('DSPF ''/tmp/testJSget.txt''': 200)
Here's what the RPG program displays
<html>
<head>
<script>
function wumboize() {
document.getElementById('result').innerHTML = 'wumbo' ;
}
</script>
</head>
<body onload="wumboize()">
15:25:18 <div id='result'>fish</div>
</body>
</html>
This is the same text as 'View Page Source' shows from the
browser.
----------------------------------------------------------------------
-------------------
Any suggestions on how to return the Javascript output
('wumbo') would be much appreciated.
Ed Schechter
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------