(Solved) jquery ajax base_url() |
[eluser]gazza7364[/eluser]
Hi I'm trying to figure out how to get a url which puts the data into a div without using the full url. this is a snippet of the code in the controller:- Code: $host = 'music/'; Has you can see this is sent by json, which when loaded sends the data to jquery function contentDisp(). the jquery contentDisp() is as follows:- Code: function contentDisp(id) The problem i'm having, is the URL which I'm getting back is wrong. http://localhost/media/music/R.E.M/artist.html which should be http://localhost/music/R.E.M/artist.html. if I change $host to http://localhost/music/ everything works fine. Is their a way of writing this without using http://localhost. I have tried using base_url() but that then produces http://localhost/base_url()/music/R.E.M/artist.html.. Any help would be much appreciated. |
Messages In This Thread |
(Solved) jquery ajax base_url() - by El Forum - 01-09-2012, 09:57 AM
|