August 1, 201313 yr Hello, looking for a quick way around a problem. I have a follow button on my website that when clicked, submits data via ajax. I have else where used the ajax code so that the div changes its css as it happens, but its not working with this one as i have variables for the colour etc in the php files and all sorts. So i have the form contained in a div called "followdiv" I just want the content of the div to reload. On the page there is a call to the database in which it makes a check and sets the submit buttons class depending on the result. Is it possible to just reload the div and nothing else so it works like that? Here is what i have so far for the success part of the ajax call: if (response.databaseSuccess) $("#buildtopinfo").load(''), document.getElementById("followsubmit").disabled = true; this however ofcourse loads the whole page inside that one div. Hope this makes sense!
August 1, 201313 yr Author found this on another thread: $('#divid').load('page.php #divid'), worked a treat!
Create an account or sign in to comment