Re: php <-> js (was Javascript Navigation)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2006-04-27 at 19:39, tedd wrote:
> At 1:57 PM -0700 4/27/06, Paul Novitski wrote:
> 
> >>Okay, I understand how js and html can communicate with php -- but, 
> >>that's not the problem. My statement above was part of a 
> >>symmetrical requirement regarding communication.
> >
> >Sorry -- "symmetrical"?  Please elucidate, I'm not familiar with 
> >this term in this context.  Which factors need to be the same on 
> >both sides of the Turing box lid for your criteria to be satisfied?
> 
> And
> 
> At 3:16 PM -0400 4/27/06, Robert Cummings wrote:
> 
> >Communication need not be symmetrical. All that is required is that each
> >end understand one another.
> 
> Arrrgggg...  my head hurts   :-)
> 
> Okay, a little misunderstanding here.
> 
> In my statement of symmetrical requirements regarding communication I 
> basically said:
> 
> 1. js -> php
> 2. php -> js
> 
> I was simply using symmetrical *statements* to illustrate my point. I 
> was not implying a requirement that all communications must be 
> symmetrical, understand?
> 
> Now, I know [1] that js can pass variables to php and cause it to run 
> -- I do that using ajax -- that's not a problem.
> 
> What I don't get is how php can pass variables to js and cause it to 
> run "at will". I can see how php can, and have used php to, generate 
> a web page which has <body onload="js()"> tag, which can pass a 
> variable to js and will cause js to execute. But, isn't there 
> anything else? Is that all there is?
> 
> Paul you said:
> 
> >All this seems very obvious to me, but knowing your level of 
> >sophistication with programming I'm led to suspect that perhaps I'm 
> >not understanding your question properly.
> 
> Thanks for the compliment, but I can be as dumb as a post about 
> things until I fully understand them. However, everything you said I 
> understand.
> 
> I understand that XMLHttpRequest works -- I'm a little fuzzy about 
> how -- but, I have used it to both send data to php and to cause php 
> to execute. That's not a problem.
> 
> I also understand that php can generate html (have done it) and echo 
> out javascript that may, or may not, run if js is present -- like 
> Robert suggested in his WAHOOEY (LOL) example. But, that appears 
> messy to me. If php wants to say something to js, then a page must be 
> created -- it seems like a lot foreplay to get at the goodies.
> 
> I guess what I'm looking for is something simpler -- is there?

There isn't something simpler, but that is necessitated by the stateless
nature of the web, and the security requirements of the client (the poor
sucker browsing the net :) I understand your desire for the simplicity
of a desktop application, but anonymous data sources and trust aren't
usually compatible. In the web paradigm the both the user and the server
need to distrust one another by default which isn't the case for bought
from a reputable, honest to goodness real live person, manually
installed desktop application *grin*. Although, can't say I trust MS
much.

> PS: WAHOOEY indeed -- LOL, I'm still chuckling about that.

It was nice of PHP to let us name our heredoc delimiters. I guess the
standard is EOF, but why write boring code ;)

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux