![]() |
tinymce.js source - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: tinymce.js source (/showthread.php?tid=53554) |
tinymce.js source - El Forum - 07-28-2012 [eluser]Unknown[/eluser] hello guys, i am new to codeigniter, and i have some trouble installing tinymce in my website. at the beginning, i tried to work on localhost, and the tinymce work well... i am using a helper (name is : a_helper.php) to integrate the tinymce into the view page, which code looks like this : Code: if (!defined('BASEPATH')) exit('No direct script access allowed'); the controller was : Code: class controlphoto extends CI_Controller and the view was : Code: <html> everything went well, and the tinymce works just fine, but the trouble comes up when i tried to upload the site into my online webserver. i already change the code in a_helper.php into something like this : Code: $tinymce = '<- script type="text/javascript" src="http://my_website_name/js/tinymce/tiny_mce.js" -> but the tinymce just can't work. i think it's because the tiny_mce.js can't be located properly. anybody can help me? i also tried to use the base_url() from url helper, and make the source something like this: Code: $tinymce = '<- script type="text/javascript" src="http://'. base_url() .' js/tinymce/tiny_mce.js" -> with my base url set up as http://my_website_name/ at config. also i used the autoload.php in config to load my a_helper.php, can anybody please tell me what went wrong ![]() tinymce.js source - El Forum - 07-29-2012 [eluser]mrh[/eluser] Well I'm new too but I'm not having trouble loading JS... But your use of base_url() seems wrong. I think it should be just: Code: base_url() js/tinymce/tiny_mce.js IE for me base_url() contains all of the required HTTP prefixing. Also in your config.php have you defined $config['base_url']? This should be the reference to your site as in: Code: $config['base_url'] = 'http://www.mysite.com/'; tinymce.js source - El Forum - 07-29-2012 [eluser]InsiteFX[/eluser] Code: <?php echo base_url('js/tinymce/tiny_mce.js'); ?> tinymce.js source - El Forum - 08-03-2012 [eluser]Unknown[/eluser] thank you all, my problem solved, it was just like insiteFX said, i use <code> base_url('js/tinymce/tinymce.js') </code> |