i know there are a lot of questions on this subject, but i can't seem to get my load function to work, even with all those answers out there.
I would appreciate it very much if someone could help me!
The idea is to load the #minibox div
from the given URL into a div with the ID of #dophtml
the links have this form: http://dop.derbigum.com/index.php?page=&fol=/V1111_VAEPLAN%20V-FR/DE
then i like to add the value &showtemplate=false to the link to reduce the server load (i only need the bare minimum HTML), so i prevent the default click action
add the "&showtemplate=false" part. next i also add the div i want .load()
to filter out #minibox
and i call the .load
function to wrap it up.
I tried 2 methods:
$(document).ready(function () {
$('#modalmydop a').on("click", function (event) {
event.preventDefault();
var posturl = $(this).attr("href") + "&showtemplate=false" + " #minibox";
$('#dophtml').load(posturl);
});
});
and
$(document).ready(function () {
$('#modalmydop a').on("click", function (event) {
event.preventDefault();
var posturl = $(this).attr("href") + "&showtemplate=false" + " #minibox";
$.load(posturl, function(data){
$('#dophtml').html(data);
});
});
});
Both methodes don't do anything. i fiddled around https://jsfiddle.net/rezium/oztj1313/22/ but i'm getting nowhere.
is .load() not the right api for the job? or does my link contains conflicting elements?