Hello there,
I am stuck with my Rails application where I use JQuery to post/get ajax requests and I have this following error (found by using Firebug).
missing ; before statement
<script type="text/javascript">\n
I am using the JQuery ajax method to post like this:
function day_on_change() {
jQuery.post( "/times/add"+ "?day_id=" + $('#day_id').val() + "&pool_id=" + $('#pool_id').val() ,null, function(data) {
$('#container').html(data);
}, "script");
}
The function 'day_on_change' is called when a select dropdown menu is changed. It posts to 'times/add' with ajax and the response data is replaced in the Div with id 'container'.
The response data is as follows:
<script type="text/javascript">
DD_roundies.addRule('#normal_header_2', '5px 5px 0 0');
DD_roundies.addRule('#normal_footer', '0 0 5px 5px');
</script>
<script type="text/javascript">
jQuery(function($) {
//more js code here
});
</script>
<!-- Some HTML here too -->
Any help would be appreciated.
Cheers.