Reputation: 167
I need to use javascript or jquery to get a html or php file and put its contents inside a div of the current page.
I know how to do this using ajax but would like to know if there is a simpler way without having to use all the code that ajax uses.
Upvotes: 2
Views: 1906
Reputation: 2471
if <div id='mydiv'></div>
is your target:
$('#mydiv').load('/address/to/page');
Should do the trick.
Upvotes: 2