I'm not quite sure what you mean...  If Javascript were disabled then
this whole argument would be moot.  Since our method requires Javascript
to properly function we're really not interested in that particular
situation.  :)

There are two ways a PHP script (or any scripting language for that
matter) can send input to a Javascript.  One, by dynamically generating
a local Javascript with the lines of code necessary to perform a certain
task.  Two, by sending information through the URL string to a remote
Javascript which runs functions based on that information.

Classic Input/Output.  It doesn't matter where the input is coming from
so long as the program gets what is expecting.  So in this sense the two
unrelated programs (one server side, one client side) are communicating,
just not directly.

Bottom line is the method works so I don't understand what there is to
debate.  See here for a working example....


It's not very sophisticated yet (all the junk left in the URL, et al).
But it does what I'm talking about.  You can copy & paste this
Javascript into any web page and it'll return the same database
information gathered by the PHP script.

-----Original Message-----
From: Alexander Skwar [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 19, 2002 4:27 PM
To: Kevin Stone
Subject: Re: [PHP] Calling Javascript-function from php-script ...

»Kevin Stone« sagte am 2002-03-19 um 14:11:42 -0700 :
> Not entirely true.  Javascript is directly linked to HTML and HTML is
> directly linked to PHP so you can have PHP talk to Javascript through

I still don't agree.  You can of course create JavaScripts dynamically
in PHP.  However, PHP won't talk to JS, it's the browser which will
execute the dynamically created JS and then maybe talk back to the
server and thus execute some PHP code.  This may seem like nitpicking,
but I don't think it is.  If PHP were to execute the JS, it would work
even when the user had disabled JS in his browser.

Alexander Skwar
How to quote:   http://learn.to/quote (german) http://quote.6x.to
Homepage:       http://www.iso-top.de      |     Jabber:
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 2 days 12 hours 18 minutes

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to