Ajax - Database functions [DB Loader problems within Ajax Data page]
Permalink
I am attempting to change some content when a select box is changed.
But am struggling to figure out how to grab information from the db.
This is my current code.
Then in the course_tools.php
If I don't use the DB loader I can output content. Currently I get
Fatal error: Class 'Loader' not found in. I realise this is because the page is not loading in the static class.
Can anyone point me towards the correct way to pull this information in? can I use concrete tools or do I need to revert to a mysql() command?
Thanks
Sean
But am struggling to figure out how to grab information from the db.
This is my current code.
$('#course_select').change(function (event) { $.post("/tools/course_tools.php", { selected:$('#course_select').val(),courseID:<?php print $kID?> }, function (data) { $('#course_details').html(data); } ); });
Then in the course_tools.php
If I don't use the DB loader I can output content. Currently I get
Fatal error: Class 'Loader' not found in. I realise this is because the page is not loading in the static class.
Can anyone point me towards the correct way to pull this information in? can I use concrete tools or do I need to revert to a mysql() command?
Thanks
Sean
Thanks for your help Remo,
would this work without the package declaration? I am calling this from a single page. So assume it will be just
[edit]Aha got it, I did not realise until looking at the source that my initial echo for the $courseAjaxURL was not being wrapped with quotations. I had attempted using recommended before but could not get it quite right.
Thanks again
would this work without the package declaration? I am calling this from a single page. So assume it will be just
[edit]Aha got it, I did not realise until looking at the source that my initial echo for the $courseAjaxURL was not being wrapped with quotations. I had attempted using recommended before but could not get it quite right.
Thanks again
Great ;-)
You can use the following code to get the correct url: