Jump to content

load a function when div content is changed


shadowayex

Recommended Posts

I would use onsubmit in conjunction with a form. Like what the script I gave you from "Chat box and IM system" has - you can just include other functions in the onsubmit handler.

Link to comment
Share on other sites

Then problem with onchange events in text elements is that the DOM only registers a change when the focus has changed. So simply adding characters is not enough. The user has to add characters and then click on some other element. I suppose this is to give the user the opportunity to change his/her mind. Okay, I guess that makes sense. Anyway, it makes onchange ambiguously useful for the kind of sitch you describe. Better to wait for the submit event itself. Psychologically speaking, I think that really is the only time at which you can say the user is committed to the new text, anyway.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...