Re: [PHP-EVANGELISM] client side
[email protected] (Tim Broddin) Wed, 05 Feb 2003 18:50:22 +0100
| Newsgroups | php.evangelism |
|---|---|
| Message-ID | <[email protected]> |
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: [email protected]
>
>
>
>>-----Original Message-----
>>From: Gabor Hojtsy [mailto:[email protected]]
>>Sent: Thursday, 6 February 2003 1:09 AM
>>To: [email protected]
>>Cc: Derick Rethans; Pete; [email protected]
>>Subject: Re: [PHP-EVANGELISM] client side
>>
>>
>>
>>
>>>Client-side PHP isn't that bad idea! Not sure how
>>>
>>>
>>ActiveScript 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
>>
>>
>>
>
>
>
>