mcmuney Posted January 5, 2014 Share Posted January 5, 2014 On a single page, I have 2 functions: 1) one is similar to a FB wall, where users click to post a comment and the textarea appears on click and posts on submission 2) it's a modal window that opens on click and users enter text and submits, and on submit, the modal window closes and the page refreshes automatically The below code is what's at the very top of the page, which are lines 1-7. When line 5 is in its current position, option 1 above works as expected, but option 2 does not work properly. On submit, the modal window does not close and the page doesn't refresh automatically. However, if I move line 5 and place it on line 1, option 2 works as expected, but on option 1, the textarea does not appear on click and users can't post. What could be the conflict? Thanks. <script type="text/javascript" src="ajax/modal_window/js/ajax.js"></script> <script type="text/javascript" src="ajax/modal_window/js/modal-message.js"></script> <script type="text/javascript" src="ajax/modal_window/js/ajax-dynamic-content.js"></script> <script type="text/javascript" src="ajax/prototype.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.oembed.js"></script> <script type="text/javascript" src="js/wall.js"></script> Quote Link to comment https://forums.phpfreaks.com/topic/285103-ajax-script-placement-conflict/ 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.