[PHP] Onclick and PhP

2001-08-15 Thread Flugel

When a page is loaded the php code is being executed, is this also possible
for an onclick event? If so how do I do that?

tnx!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Onclick and PhP

2001-08-15 Thread Flugel

Is it also possible for the output of that php-page (MySQL query) to be
displayed in a layer on the page where the button is located?

Renze Munnik [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Wed, Aug 15, 2001 at 11:45:03AM +0200, Flugel wrote:
  When a page is loaded the php code is being executed, is this also
possible
  for an onclick event? If so how do I do that?
 
  tnx!


 No. PHP is server-side, not client-side like onclick (JS). The only
 way to do things like that is:

 onclick=window.location.href='blahblahblah.php';

 --

 * RzE:

 -- 
 -- Renze Munnik
 -- DataLink BV
 --
 -- E: [EMAIL PROTECTED]
 -- W: +31 23 5326162
 -- F: +31 23 5322144
 -- M: +31 6 21811143
 -- H: +31 23 5516190
 --
 -- Stationsplein 82
 -- 2011 LM  HAARLEM
 --
 -- http://www.datalink.nl
 -- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re[2]: [PHP] Onclick and PhP

2001-08-15 Thread Flugel

Wow you're good!! Tnx that was exactly what I needed!!

Thumbs up for Morten Winkler Jørgensen

tnx again!

Orv î?÷inklÏ ²ørÏkîskî [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Try this page. It is a hack but I think it does what you want it to.



 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN
 HTML
 HEAD
 /HEAD

 BODY BGCOLOR=#FF TEXT=#00 LINK=#FF VLINK=#80
ALINK=#FF00FF BACKGROUND=?

 ?
 function theAnswer($action) {
 if($action == show) return 42;
 return ;
 }
 ?




 This is a page with a button on it. When you press it you willget
something in the layer.
 BR
 INPUT TYPE=button VALUE=Show onClick=location.href='? echo
$PHP_SELF; ??action=show'

 DIV STYLE=position : absolute; left : 150px; top; 250px; width : 200px;
height : 200px; background : #FF; color : #FF
 ? echo theAnswer($action); ?
 /DIV

 /BODY
 /HTML


 --
 Kind regards,
   Morten Winkler





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]