PHP Object -> JavaScript Object

From: Date: Wed, 25 Jun 2003 03:47:25 +0000
Subject: PHP Object -> JavaScript Object
Groups: php.lang 
Request: Send a blank email to php-lang+get-509@lists.php.net to get a copy of this message
Hi I am a newbie here I defined an object and want to parse it into JavaScript However when I enter the JS function, the object becomes empty. How can I use the PHP object in JS? Thanks! Please see the simpified codes below <? class phpObj { .... } $parseMe = new phpObj; ?> <html> <script lang="javascript"> function eatObj(jsObj) { // jsObj is empty! } </script> <body> <a href="javascript: eatObj(<?=$parseMe?>")>Parse the Object!</a> </body></html>

« previous php.lang (#509) next »