Re: Which Is The Better Approach To Working With Javascript?

"Jerry Stuckle" <jstucklex@xxxxxxxxxxxxx> wrote in message
Barry wrote:
"Jerry Stuckle" <jstucklex@xxxxxxxxxxxxx> wrote in message
bill wrote:
Jerry Stuckle wrote:
Ivan Marsh wrote:
On Tue, 08 Jul 2008 17:27:08 -0400, Jerry Stuckle wrote:

Patient Guy wrote:
Jerry Stuckle <jstucklex@xxxxxxxxxxxxx> wrote in comp.lang.php:

Patient Guy wrote:
Which is the better approach in working with Javascript?

1. Server side processing: Web server gets form input, runs it
the Javascript module, and PHP collects the output for document

2. Client side processing: Web server gets form input and passes
to PHP which includes the Javascript written in a way to make the
form input processed on the client side and rendered (probably
DOM function calls) on that side as well.

I posted this <news:Xns9AD554BCD7E9FUVAA@xxxxxxxxxxxx> in an
apparently less trafficked newsgroup and the post was the TLDR
but it has the background and details of why the code must be in
Javascript and why PHP must work with it somehow. It also gives
details of the server and how it forks and communicates with
processes to parse/generate output.

3. Try a javascript newsgroup. This one is for PHP.
So, based on your response, you are telling me that a PHP
implementation has no interprocess communication capability, or
to interface with a (Java)script interpreter.

Hint: javascript does NOT run on the server.
A server, or a server-associated process, can start a script host,
passing some form of input to it, and the script host does the
interpretation, while the calling process waits for output.

However this is achieved, PHP (by design?) has no script interface,
based on your response.
That is correct. Javascript runs on the client. Communications
PHP and javascript is limited. PHP can generate javascript code,
javascript can submit data to the server for PHP to process.

But there is no javascript interpreter on the server. That is the
browser's job.
Except that you can run server-side javascript... though I don't know
you would want to.

What interpreters are available for javascript on the server, and what
hosts have it installed?

It is not part of the package of any web server.

And how about the second part of the question - what hosts have such
packages installed?

i like how you can speak for all web server installations, jerry.
further, when proven wrong about js being client-side only, you just
change pace and say, 'well, no one has that on their server!'. you simply
tried to speak with authority on a topic you obviously know nothing
about. why not just say you were wrong and then move on?

Yes, I was wrong about not being able to do it server side. However, of
course there are great limitations to doing it there.

it's good you can say that. now as for the limitations, that's as irrelevant
as asking who has the server capability. that's outside the scope of the
OP's question.

And I didn't say no one has that on their server.

"It is not part of the package of any web server." - stuckle

so, how are we to have read that?

I asked which hosts have it installed.

Please answer the question.

anyone that is willing to take your money to install one of several ss-js
interpreters. hosts are as reluctant to install them as they are perl (i
think you get the sarcasm there).