I found out:
here is the code:
function addOnClickFunction(elem, newFunction){
var orig = elem.onclick;
elem.onclick = function(){
newFunction();
if(orig){
orig();
}
}
}
Is it possible to combine two JavaScritpt functions?
I want to "automatically" add a function to all input fields. But origianl function sould also be called.
Example: I have a following field:
<input onchange="alert('hi ')">
Then I want to add a call to
function sayHello(){...
Thank you Feherke,
Is there any other way to mark the element, so that I can chack for that mark later? I have a lot of fields in the form and some of them need to be marked.
irinapl
Hi,
I need to add custom attribute to the "html:text" tag.
Example:
<html:text name="emailForm" property="email" performValidate="true" />
And the result would be
<input type="text" name="email" value="" performValidate="true">
The attribute "performValidate" will then be checked with...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.