Re: Questions about php

From: Date: Wed, 14 May 2003 22:45:35 +0000
Subject: Re: Questions about php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147658@lists.php.net to get a copy of this message
PHP ActiveScript is a way to use PHP on the client side. I know it sounds weird, but it's something that Wez Furlong came up with. http://www.zend.com/lists/php-dev/200205/msg00634.html http://chora.php.net/co.php/php4/sapi/activescript/README?r=1.1 It appears that you would have to install/register this on every client machine that is going to access your page. So if you're wanting this for a public website, this is not at all going to work for you. (Someone correct me if I'm wrong) Assuming this won't work... you have a couple of different ways of executing PHP from a link. 1. Make the link go to a PHP page. This is the simplest. Of course this means that user is navigated away from the original page where the link was clicked. 2. Make the link open a pop-up window (using javascript) to a PHP page which executes the desired code, and then closes the pop-up. This leaves the main browser at the same page, however having a pop-up come up and then close might be a bit strange for the user. 3. Use frames, possibly a 1px frame. Make the link target the tiny 1px frameset. That frame will execute the desired PHP code, and the original page won't change. Because the frame is so small, the user can't even see it. 4. Swap images. This is a real tricky way to execute PHP without opening a new window, using frames, or changing the original page. Place a 1x1 pixel transparent gif image somewhere on the page, give it an id. Then make your link execute a javascript function that swaps images (you know, like what you would use to create menu image rollovers). Swap the transparent gif with a PHP page. When the browser calls for the PHP page, the server will parse and execute the PHP code. Normally if you try to display a PHP page as an image, it would show a red 'X' on the browser, but since you are swapping it with a 1x1 pixel image, you can't even see it. So.... the link is clicked, the image is swapped, PHP is executed, and the user hasn't even seen anything happen. The downside? It requires javascript to be enabled in the users browser. Hope this helps. Joseph "Marlon Brandao_estag" <marlon.brandao_estag@tvglobo.com.br> wrote in message news:98E871E5666AD7118BA9000629A80C4201A36B81@BE-NTS-EXC-P01... > Ok, I understand it. But I sent a e-mail to <andrei@php.net> and he said me > to ask here for informations about ActiveScript mode though. > He said me that it would help me. So what is it? > Thank you for helping me > Marlon

« previous php.general (#147658) next »