Re[2]: [PHP] Onclick and PhP

From: Date: Wed, 15 Aug 2001 10:51:22 +0000
Subject: Re[2]: [PHP] Onclick and PhP
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-62807@lists.php.net to get a copy of this message
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="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" 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 : #FF0000; color : #FFFFFF"> <? echo theAnswer($action); ?> </DIV> </BODY> </HTML> -- Kind regards, Morten Winkler

« previous php.general (#62807) next »