You are absolutely correct, that anything that ran on the client machine would have to be safe and not venture outside the "sandbox", but that is not what I had in mind, and I don't think that was the goal of "PUB"? Who began this thread. I believe he wanted to manage some responses to mouseover, and was sent to another list to find his answer. You are right on again with the understanding that much of the power and elegance of PHP would not be available for this type of coding, but there still is a need and a reason people are forced to turn to Javascript (which is also limited to the "sandbox"), starting with simple interactive data validation, and moving right on up to managing images, or changing control behaviors and such. I just think it would be nice to be able to do it all in PHP, it's such a graceful language to work with. Meanwhile, I think I'll check out PHPScript, that Richard Lynch found, as soon as I can. Warren Vail -----Original Message----- From: Evan Priestley [mailto:spam@xxxxxxxx] Sent: Wednesday, April 26, 2006 2:16 PM To: Warren Vail Cc: 'PHP General List' Subject: Re: New Help with Javascript Navigation No, I'm saying that Javascript can't read or write files on the client's machine, and that this is only one of a large number of basic limitations in the language's capabilities. It would be possible to write a script which took "$a = 3" and converted it into "var a = 3", but a huge number of PHP functions either can't be implemented in Javascript (file_get_contents) or are fundamentally unsafe to implement in Javascript (mysql_query), so you'd end up with a language you couldn't do anything with. Evan On Apr 26, 2006, at 5:07 PM, Warren Vail wrote: > Evan, > > Are you proposing something like AJAX does? My understanding is > limited here, so bear with me. A control like a hidden imbedded frame > (IFRAME) is > acted upon by Javascript to cause it to dynamically request loading a > page into the frame, and when loaded, the javascript processes the > contents of the frame without necessarily displaying it directly? > > And then do the translation on the client? > > Could work, but I was thinking more of doing the tranlation in a > function in PHP, but that may be because PHP is my perspective. > Something like; > > --------------------------- snip -------------------------- Html stuff > <?php echo scripttranslate(" > Php code follows here.... Careful with quotes"); ?> More html stuff > --------------------------- snip -------------------------- > > Or > > --------------------------- snip -------------------------- Echo "html > stuff here" > .scripttranslate("php stuff here..." > ." again carefull with quotes") > ."more html stuff here"); // end of echo statement > --------------------------- snip -------------------------- > > Warren > > -----Original Message----- > From: Evan Priestley [mailto:spam@xxxxxxxx] > Sent: Wednesday, April 26, 2006 1:47 PM > To: Warren Vail > Cc: PHP General List > Subject: Re: New Help with Javascript Navigation > > Tell you what: write file_get_contents() in Javascript, and I'll write > the rest of it. > > Evan > > On Apr 26, 2006, at 4:36 PM, Warren Vail wrote: > >> This brings up a reoccurring issue for me and I'd be interested if >> anyone else has given it any thought. >> >> PHP appears to me to be incomplete unless it can provide a way to >> provide client (browser) side executables in a consistent language, >> namely PHP. >> Developers get all excited about the elegence of the PHP language, >> and somewhere along the way they discover they have been sandbagged >> (they have to learn Javascipt too, if they want responsive GUI's). >> >> One solution would be to develop a PHP Plugin and support that for >> all the browsers out there, but another just occurred to me. What if >> there was a function that accepted PHP code as input and tranlated it >> to Javascript, returning the resulting text ready for imbedding in >> html? >> >> Any creative masochists out there? Has it already been attempted? >> >> Warren Vail >> >> -----Original Message----- >> From: Jay Blanchard [mailto:jblanchard@xxxxxxxxxx] >> Sent: Wednesday, April 26, 2006 1:07 PM >> To: Pub; php-general@xxxxxxxxxxxxx >> Subject: RE: New Help with Javascript Navigation >> >> Pub, >> >> Thank you for subscribing to and participating in the PHP users list, >> a place where your PHP questions can be answered. Unfortunately your >> last post contained several problems; >> >> a. It was to long. >> 2. it was a JavaScript question. >> >> Thank you, >> >> Jay >> >> -- >> 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 > > -- > 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