mcmuney Posted February 2, 2013 Share Posted February 2, 2013 I have a scenario where the javascript stops working once a section of a page is reloaded. For example: <javascript> some java code to open an image usina a fancy window </script <div id="reload_section"> <a href="image" id="java-fancy-window" onclick="java-fancy-windo"><img src="image"></a> </div> <a href="reload_section_page">RELOAD SECTION</a> I'm using something like this and when I click on the image, it opens the image in a nice popup window; however, when the <div> section is reloaded, the same function stops to work. I've even tried placing the java code again inside the page that's reloaded inside the <div>, but it still does not work. Any ideas? Link to comment https://forums.phpfreaks.com/topic/273944-java-conflict-question/ Share on other sites More sharing options...
requinix Posted February 2, 2013 Share Posted February 2, 2013 What do you mean by "reload"? Are you destroying and/or recreating the a#java-fancy-window? It'll lose the onclick event you have written there inline. Link to comment https://forums.phpfreaks.com/topic/273944-java-conflict-question/#findComment-1409690 Share on other sites More sharing options...
Jessica Posted February 2, 2013 Share Posted February 2, 2013 For the record, java is not Javascript. Two different things. Are you loading the page via AJAX? Link to comment https://forums.phpfreaks.com/topic/273944-java-conflict-question/#findComment-1409737 Share on other sites More sharing options...
mcmuney Posted February 2, 2013 Author Share Posted February 2, 2013 Yes, I'm reloading the <div> section via ajax, which loads a new image. But after a reload, the image load on the fancybox stops working, even though the java is outside of the <div> that's reloading withing the page. Link to comment https://forums.phpfreaks.com/topic/273944-java-conflict-question/#findComment-1409777 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.