The templates directory is at the same level as index.php, so ./ is acceptable. Otherwise, I would see file can't be found errors in Apache.
Is there a way to put the ajax post within the
for the tab references?Ok, I was able to grab generated source of the pages, so hopefully this will help. Let me know if there is more you would like to see and I will see what I can come up with.
Here is the main page.
Device Dashboard$('#dashboardTab').load('./templates/dashboard.tpl.php', function() {});
$('form').submit(function() {
var $theForm = $(this);
console.log($theForm);
$.ajax({
type : "POST",
url : "./templates/mtconfig.tpl.php",
data : $theForm.serialize(),
success : function(returnData) {
console.log("Form sent");
$("#mtConfigTab").html(returnData);
}
});
return false;
});
And here is the generated source if you click on one of the forms with name="form_man_1". When you click the Manage button, it should switch you to the Device Config tab and use the POST to determine which device to display.
Device Dashboard