I am using codeignitor with jquery.
My JS is as following:
$(document).ready(function() {
var p = {};
$('#content').load(/mycontroller/myfunction,p,function(str){
});
});
It gave me an invalid regular expression flag r error on line 3. I am not sure it is a JS error, or the codeignitor mod_rewrite issue.
Can someone please shred some lights?
You need quotes around the path:
"/mycontroller/myfunction"
the .load()
function takes a url in the form of a string.
var p = {};
$('#content').load("/mycontroller/myfunction",p,function(str){
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With