I know that this question have been asked before but I still couldn't find the solution for my problem.. The thing is.. it happens at production server, but works well in development. So I'm not sure whats wrong with it. Appreciate if you could advice. Thanks in advance.
The following is my code.. and I had this "Uncaught SyntaxError: Invalid or unexpected token" error on my jQuery.jGrowl
<script src="<?php echo base_url(); ?>js/jquery.jgrowl.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/jquery.jgrowl.css">
<?php $message = $_SESSION['message'];
if($message) { ?>
<script>
jQuery(function(){
jQuery.jGrowl("<?php echo $message; ?>", { header: 'Message' });
});
</script>
<?php $_SESSION['message'] = '';
}
?>
I get this error:
Uncaught SyntaxError: Invalid or unexpected token
On this line:
jQuery.jGrowl("<?php echo $message; ?>", { header: 'Message' });