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

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

 



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?


tedd

PS: WAHOOEY indeed -- LOL, I'm still chuckling about that.
--
--------------------------------------------------------------------------------
http://sperling.com

--
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