Re: No output in calling HTML ?

From: Steve (googlespam_at_nastysoft.com)
Date: 11/17/04


Date: 17 Nov 2004 03:12:11 -0800


Pjotr:

Using this style, you are asking your client (the browser) to execute
the script locally, rather than the server. This is unlikely to work.

If you want the script to execute on the server and insert output into
an HTML document, one method would be:

myscript.php:
<?php
// send some javascript...
print "document.write( 'hello!' );";
?>

mypage.html:
<html>
<head>
<title>Just a page</title>
</head>
<body>
<script language="javascript"
src="http://www.anotherserver.com/myscript.php"></script>
</body>
   </html>

---
Steve


Relevant Pages

  • Re: IP addresses and JS.
    ... >>A computer language is just that, ... Javascript is just a programming language, and may be used to script all ... The interaction between a web browser and a server is through HTTP. ... execute scripts and/or programs, ...
    (comp.lang.javascript)
  • Re: Help with a socket script execution
    ... necessary execute the socket server script from the console (#!/usr/ ... along with some PHP magic so the script doesn't die when the HTTP ... you give me a few details about how to use exec command? ... only execute something and finish it execution or wait until the ...
    (comp.lang.php)
  • Re: is it possible to call vbs file with js?
    ... Server side code will *never* execute in the browser. ... shared between server and client (e.g. parsers, validators, HTML forms ... But they won't share the same script block. ...
    (comp.lang.javascript)
  • Re: is it possible to call vbs file with js?
    ... side script to execute in firefox" and the answer is quite simple. ... Server side code will *never* execute in the browser. ... client side script "prints" the HTML into the document object. ...
    (comp.lang.javascript)
  • Re: Reading SCRIPT_FILENAME thru cron
    ... $sp1 is set correctly when I execute file.php thru the browser. ... when I run that script thru cron $sp1 is always null. ... $_SERVER is filled in by the web server - and it won't exist if you don't access the page though the server. ...
    (comp.lang.php)