Re: Javascript function
| From: | Hans Prins | Date: | Wed, 19 Feb 2003 22:58:12 +0000 |
| Subject: | Re: Javascript function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136264@lists.php.net to get a copy of this message | ||
There are a lot of other handlers that can call your function:
onChange, onFocus, onBlur, onMouseOver, onKeyDown, etc......
gl :)
"Van Andel" <RVanAndel@chartercom.com> schreef in bericht
news:EF4CCFE15DD9B240991D1E74E1460D510D0E82A6@stl02mexc07.corp.chartercom.co
m...
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