Welcome Guest, Not a member yet? Register   Sign In
base_url() and jQuery problem
#1

[eluser]kidego32[/eluser]
Hi everyone,

I'm trying to use the base_url() function inside a jQuery script, but it appears that the function is not being evaluated.

My code is as follows:
Code:
$.ajax({
            type: "POST",
            url: "<?=base_url()?>quotes/glass",
            data: dataString,
            dataType: 'text',
            success: function(text) { $('#quote-result').html(text); }
                
        }); // close of .ajax section

When I hardcode the url ("http:localhost/quotes/glass"), everything works. Can anyone guide me in the right direction?

Thanks,

Julio


Messages In This Thread
base_url() and jQuery problem - by El Forum - 11-17-2008, 11:48 AM
base_url() and jQuery problem - by El Forum - 11-17-2008, 12:52 PM
base_url() and jQuery problem - by El Forum - 11-17-2008, 03:30 PM
base_url() and jQuery problem - by El Forum - 01-25-2014, 07:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB