Jump to content

AJAX is destroying my events


ShadowMage

Recommended Posts

Hey guys,I have an embedded window that I'm populating with AJAX. The problem is that my events only work the first time the window is opened. Here's the chain of events:

  • Load my webpage
  • Open the embedded window and send an AJAX request to retrieve a large HTML string and set that to the innerHTML of the content div in the window
  • Call an initialization function to register my event handlers
  • Make changes, which fires the onchange/onclick handlers of my various inputs
  • Click save, which sends another AJAX request to a save script to update the database and closes the window
  • Open a new window, which again retrieves an HTML string and calls the initialization function
  • Make changes, only this time no event handlers are firing?!

FireBug shows that the events are registered to the inputs, but they refuse to fire. Any advice?EDIT:Doh! :) Stupid duplicate id's!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...