Re: client side
| From: | Tim Broddin | Date: | Wed, 05 Feb 2003 17:50:22 +0000 |
| Subject: | Re: client side | ||
| References: | 1 | Groups: | php.evangelism |
| Request: | Send a blank email to php-evangelism+get-205@lists.php.net to get a copy of this message | ||
Couldn't we made some sort of PHP extension so we could write PHP code intended for the client-side and PHP would transform that into valid JavaScript?
example:
a file (example.php) on the server:
<html>
<head>
<title><? echo 'Test'; ?></title>
<script language = "PHP" runat="client">
$answer = clientprompt('Do you like this?');
if ($answer == 'yes') {
clientalert('Oh yeah!');
} else {
clientalert('Damn!');
}
</script>
</head>
</html>
woult be outputed to the client as:
<html>
<head>
<title>Test</title>
<script language = "JavaScript">
var answer;
answer = prompt('Do you like this?');
if (answer == 'yes') {
alert('Oh yeah!');
} else {
alert('Damn!');
}
</script>
</head>
</html>
Stupid example and probably stupid idea
On 5/02/2003 18:37, Timothy Hitchens (HiTCHO) wrote:
Clients wouldn't have to install if we look at the IE under windows market and simply supply as an auto install activeX just like flash and remember that the biggest market for this type of functionality would be in the intranet/extranet mostly closed network where people want more flexibility for computations on the client. Great for messaging/graphing direct database calls etc etc Security would be an issue as most of the plug-in type situations need to have authority to talk directly to the hard drive. Firewalls would be an issue for any database calls etc Timothy Hitchens (HiTCHO) Web Application Consulting e-mail: tim@hitcho.com.au-----Original Message----- From: Gabor Hojtsy [mailto:gabor@hojtsy.hu] Sent: Thursday, 6 February 2003 1:09 AM To: maxim@php.net Cc: Derick Rethans; Pete; php-evangelism@lists.php.net Subject: Re: [PHP-EVANGELISM] client sideClient-side PHP isn't that bad idea! Not sure howActiveScript works.I never had to work with it. Something like you can output the PHP code and it gets executed on Client's Browser? Something JavaScript-like?Absolutely. There are also other script interpreters working this way (ActivePerl for example), but there is actually no point in using this on the net, as nobody will install PHPScript to his client (or very few client will have it). VBScript was the same situation... Goba -- PHP Evangelism Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php