simpjd Posted July 2, 2009 Share Posted July 2, 2009 So in my HTML input tag I have: onkeyup="testFunction(event);" And I want to dynamically recreate this and this is where i'm up to: var input = document.createElement("input"); input.onkeyup = testFunction(event); But this doesn't seem to work!? Can any one help? Link to comment https://forums.phpfreaks.com/topic/164563-onkeyup-event-help/ Share on other sites More sharing options...
Adam Posted July 3, 2009 Share Posted July 3, 2009 This isn't actually AJAX, but, basically you need to append the element as a child, or insert it before another element. There's most likely more ways I just can't think of any off of the top of my head. Have a read through a few of the links found on Google for a better idea: http://www.google.co.uk/search?q=dynamically+create+element Link to comment https://forums.phpfreaks.com/topic/164563-onkeyup-event-help/#findComment-868370 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.