Kumar Kumar - 5 months ago 11
jQuery Question

Replace the current content of div with another page response

Sample code:

<div id="content">
<input type="submit" onclick="loadAnotherPage()"/>

I want to load another page say edit_profile.php in the
div. How can it be achieved without refreshing the page?

I tried to use jQuery
method. But looks like I missed something. Any help would be highly appreciated.


When you click submit button it's submit form and page refresh that's why its not working.

Instead of type submit set button and then set function onclick.

function loadAnotherPage(){