Hi All,
Stuck trying to add event handles to a form which is dynamically generated. At the end of the main page, I have a call like this
and then in my function I want to do this
When I do that I get an error in another part of the main page, but when the function is cleared out, the page loads fine.
I am sure that I have done something dumb, and if someone could point me in the correct direction, I'd appreciate it
Bastien
I wish my computer would do what I want it to do,
instead of what I tell it to do...
Stuck trying to add event handles to a form which is dynamically generated. At the end of the main page, I have a call like this
Code:
<script language='javascript'>SetStatus(0);registerMyEvents();</script>
and then in my function I want to do this
Code:
function registerMyEvents()
{
if (document.getElementById('EMAIL')) { document.getElementById('EMAIL').attachEvent('onblur',checkStatesForIdCapture); }
if (document.getElementById('STATE_ID_NUMBER')){ document.getElementById('STATE_ID_NUMBER').attachEvent('onblur',checkStatesForIdCapture); }
if (document.getElementById('STATE_ID_STATE')) { document.getElementById('STATE_ID_STATE').attachEvent('onchange', checkStatesForIdCapture; }
}
When I do that I get an error in another part of the main page, but when the function is cleared out, the page loads fine.
I am sure that I have done something dumb, and if someone could point me in the correct direction, I'd appreciate it
Bastien
I wish my computer would do what I want it to do,
instead of what I tell it to do...