RE: [PHP] Javascript function

From: Date: Wed, 19 Feb 2003 15:59:12 +0000
Subject: RE: [PHP] Javascript function
Groups: php.general 
Request: Send a blank email to php-general+get-136199@lists.php.net to get a copy of this message
Try this. void function MyExampleFunction(theelement) { theelement.focus() } <body onload="MyExampleFunction(document.form_name.element_name)"> The variable theelement will refer to "document.form_name.element_name" so there is no reason to repeat that portion in the function. Robbert van Andel -----Original Message----- From: Christian Ista [mailto:mailing-list@istasofts.com] Sent: Wednesday, February 19, 2003 7:48 AM To: php-general@lists.php.net Subject: [PHP] Javascript function Hello, Example, I have this function : void function MyExampleFunction(){ document.form_name.element_name.focus(); } I'd like do something like that, I call the function like that : MyExampleFunction('form_name.element_name'); And do that : void function MyExampleFunction(theelement){ document.theelement.focus(); } but that's not work ? An idea ? Christian, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#136199) next »