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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.