[eluser]Nick Husher[/eluser]
That would indicate that your jQuery script is not being parsed by the PHP hypertext processor. You can either move your ajax script into a view and call it via a controller, or you can add a way for your script to know what the root url is for your site. To accomplish the second, you can do this:
Code:
// .../system/application/views/main_template.php
<head>
// Set up a root directory global variable that all scripts will have access to
<JAVASCRIPT type="text/javascript">
CI_ROOT = "<?=base_url() ?>";
</JAVASCRIPT>
// Include jquery script files
<JAVASCRIPT src="<?=base_url() ?>assets/jquery/jquery.js" type="text/javascript"></JAVASCRIPT>
<JAVASCRIPT src="<?=base_url() ?>assets/jquery/script.js" type="text/javascript"></JAVASCRIPT>
// ... Other header stuff ...
</head>
Code:
// .../assets/jquery/script.js
$.ajax({
type: "POST",
url: CI_ROOT+"quotes/glass",
data: dataString,
dataType: 'text',
success: function(text) { $('#quote-result').html(text); }
}); // close of .ajax section
The forum XSS filter removes
script tags, so I used a fictional "javascript" tag instead.