ephemeral Posted December 21, 2009 Share Posted December 21, 2009 I'm having two Ajax-related problems on a page I am working on at the moment. You can see it here: http://www.utm.edu/departments/acadpro/library/openmic/add2db.php On this page, I have two buttons that use Ajax to fetch two separate forms and put them into a chosen div; that part works like a charm. On said forms, there is a div that is meant to display any necessary error messages when the submit button is clicked. However, on the first time the page is visited and the form is chosen, the div won't display the error message. Only after refreshing the page/choosing the form a second time will the message show. I've been checking the response from the server via Firebug and the response is correct, it just seems like the page isn't updating correctly. Secondly, once I refresh or choose the form again and the error message begins to show, if I enter values into the form fields and should be getting a different error message, it never updates. Once again, the server response is correct, but for some reason the page just isn't updating to reflect the new message. I have been using the date field on the New Event form for testing; if you have Firebug, you should be able to see that I am getting the desired response from the server, but the HTML isn't changing with it. I have tried both using my own Ajax functions and using jQuery's Ajax implementation, but both give me the same problems. What am I doing wrong? (PS - The code spans over two files -- http://www.utm.edu/departments/acadpro/library/openmic/add2db.php and http://www.utm.edu/departments/acadpro/library/openmic/js/add2db.js -- so unless someone wants to see it posted here, I won't include the large code blocks. The files are live at the urls, and are attached in a zipped folder. ) [attachment deleted by admin] Quote Link to comment 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.