![]() |
Problem when loading a helper using jQuery Ajax - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Problem when loading a helper using jQuery Ajax (/showthread.php?tid=26216) |
Problem when loading a helper using jQuery Ajax - El Forum - 01-08-2010 [eluser]CARP[/eluser] I've implemented this helper: CKEditor helper for codeIgniter http://www.kromack.com/codeigniter/ckeditor-helper-for-codeigniter/ The helper works great when I call the following way http://localhost/index.php/myapp/mycontroller/myfunction/X When I use jQuery Ajax to load the same url, but inside a div from another view, the editor doesn't show Code: jQuery("#mytextarea").change(function() { I guess the problem must be reside in ajax, right? because when I load the url directly, editor shows fine, etc. Hope you've understood my idea Problem when loading a helper using jQuery Ajax - El Forum - 01-08-2010 [eluser]JHackamack[/eluser] I'm assuming you've looked at your source and made sure that <?= is working correctly. I've had many default setups that <?= threw out error messages and I had to replace it with <?php echo Also have you used a debugger in Firefox/Safari to see the actual call being made by jquery to make sure its taking everthing on correctly? Problem when loading a helper using jQuery Ajax - El Forum - 01-08-2010 [eluser]CARP[/eluser] Oops I didn't know <?= shorttag causes that... Will try this tomorrow (2am here) Problem when loading a helper using jQuery Ajax - El Forum - 01-08-2010 [eluser]JHackamack[/eluser] In referencing: http://ellislab.com/codeigniter/user-guide/general/styleguide.html#short_open_tags Always use full PHP opening tags, in case a server does not have short_open_tag enabled. INCORRECT: <? echo $foo; ?> <?=$foo?> CORRECT: <?php echo $foo; ?> It all depends on your server config, so to make the app portable to different servers. Viewing the source of your rendered page will tell you if it works or not. Problem when loading a helper using jQuery Ajax - El Forum - 01-09-2010 [eluser]Kromack[/eluser] Could you monitor with the Firebug's console panel if any JavaScript error is triggered ? Especially if any script file that is required is not loaded (with a 404 error for example). Problem when loading a helper using jQuery Ajax - El Forum - 01-09-2010 [eluser]CARP[/eluser] Hi guys. Please let me explain better All my code use short open/close tag <?=?> and I have the short_open_tag enabled 1) When I call the controller directly in the browser bar, for example: Code: http://localhost/myapp/index.php/mycontroller/myfunct/myID 2) If I call that url from within another view (using jQuery ajax)... I mean Code: ... http://www.google.com.ar/search?hl=es&q=l.lang.about+undefined&btnG=Buscar&meta;=&aq=f&oq;= Problem when loading a helper using jQuery Ajax - El Forum - 01-09-2010 [eluser]JHackamack[/eluser] that looks like an FCK Editor, are you using FCK on your site at all? Problem when loading a helper using jQuery Ajax - El Forum - 01-09-2010 [eluser]Kromack[/eluser] l.lang.about is undefined means that CKEditor is not correctly initialized. The Ajax call might be the reason, you should check if all the JavaScript paths are correctly written when the Ajax call is made. Problem when loading a helper using jQuery Ajax - El Forum - 01-12-2010 [eluser]Kromack[/eluser] Are you using the user guide's .htaccess file ? If so, please try to move out ckeditor into js/ckeditor for example since system/plugins could be unreachable. You also have to donwload the new version of the helper in order to set the new key 'path'. |