PHP input and variables dynamic :)

From: Date: Tue, 23 Jul 2002 10:55:22 +0000
Subject: PHP input and variables dynamic :)
Groups: php.general 
Request: Send a blank email to php-general+get-109065@lists.php.net to get a copy of this message
BlankI'm trying to create input boxes on the fly by using php variables: PHP: <INPUT TYPE = "HIDDEN" NAME = "status[<?=$i?>]" value = "<?=$status[$i]?>"> so that will create: <INPUT TYPE = "HIDDEN" NAME = "status[0]" value = "collapse"> <INPUT TYPE = "HIDDEN" NAME = "status[1]" value = "collapse"> then i'm trying to set the value to something else using: onclick = "document.all['tree'].status[<?=$i?>].value='expand'; tree is the name of the form. which is giving an output of: onclick = "document.all['tree'].status[1].value='expand'; but i'm getting a an error on page dialog saying: 'document.all.tree.status.0 is null or not an object' any ideas :) basically i'm trying to create an IE and netscape friendly tree control which is all dynamically created using an array passed. Thanks Andy

« previous php.general (#109065) next »