Adding an keyUp-event to form objects
Posted
by reporter
on Stack Overflow
See other posts from Stack Overflow
or by reporter
Published on 2010-04-16T11:11:26Z
Indexed on
2010/04/16
11:13 UTC
Read the original article
Hit count: 159
Hello folks,
I've got the issue to add a browser event to some input fields. The challenge I have to face is, that one parameter of my target function is the 'event'-variable and the second one an object.
For a better understanding here some codes:
The HTML object:
<div id="1_dateFieldAdvanced" class="xp set">
<div id="1_dateFieldAdvanced_label" class="label">Birthday</div>
<div id="1_dateFieldAdvanced_value" class="value date">
<input class="day" name="dayOfBirth" value="66" maxlength="2" type="text">
<input class="month" name="monthOfBirth" value="67" maxlength="2" type="text">
<input class="year" name="yearOfBirth" value="" maxlength="4" type="text">
</div>
</div>
The source code of target method is like below:
function advancedDateFields(currentFieldAsObject, nextField, currentValueLength, ev){}
Unfortunatly the HTML and the Javascript code is generated automatically, so I'm unable to refactore the code. My question is, how can I pass the key word 'event' and the other parameters? My tries did always fail. :-(
© Stack Overflow or respective owner