Jump to content
  • Advertisement
Sign in to follow this  

[web] Accidentally cleared my events?

This topic is 3034 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Not exactly game related, but a little test webapp I'm working with has a bug which has stumped me and my more experienced co-workers. The site is fairly simple. I have a jquery topnav bar (superfish if it matters). I have a simple text input field to do searches. And I have a paging grid to display search results. The grid makes a simple ajax call and the inner bits of it are removed from the dom and a new table inserted to replace the old. I stole the grid from a larger site I work on, and it works great there. It has a searching bit, which works great there. In this little prototype though I have problems. Basically when I do a search which causes the grid to re-populate, all my events stop working. The top-nav menus don't mouseover. I actually got one of the menus to stay open because the mouse-off event stopped working in mid-popup. The 'enter key' key event on the search input stops working, the pager buttons... pretty much everything. Hover css styling still works. I can go into firebug and manually put an event on one of the buttons (like alert on hover) and that is still triggered. From what I understand, the only thing that can really cause this is a jquery empty() on a parent of the dom objects holding the events. I looked for that but empty() is only ever called in the inner grid bits. And I don't touch anything near the top-menu, but that gets broken too. I've checked to make sure that there's no id duplication in the dom. I've checked that there's no malformed data in the scripts. I've stepped through the repopulation code and it exits nicely. Firebug and the other webdev plugin I have report no javascript errors, making me think it's expected or undefined behavior I'm just not aware of or jquery getting stuck somewhere... But pretty much the same exact thing works just fine on the other site. Any ideas? I have no idea at this point. jquery 1.3.2, firefox 3.6.2, whatever iis comes on windows 7 if it matters.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!