DN0300 DN0300 - 1 year ago 79
Javascript Question

Loading a page in div using jquery and ajax

I am trying to open content into a div on click, I can't figure out where I am going wrong any help is much appriciate. Thank you


<li><a id="hrefid" href="#link">Link</a></li>

<div id="content"> </div>


$('#hrefid').on('click', function (e) {
var load = $(e.target).attr("href");
if(load == "#link") {
type: 'post',
url: "/page/test/272.html",
complete: function (event) {

Answer Source

Your intended operation is a GET operation as far as i understand, so instead of type: 'post' make it type: 'get'

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download