Welcome Guest, Not a member yet? Register   Sign In
Parsing php in javascript
#5

[eluser]Atharva[/eluser]
The workaround will be store your js code in php file something like my_js.php
Code:
[removed]
        tinyMCE.init({
            mode : "specific_textareas",
            editor_selector : "editor",
            plugins : "spellchecker",
            theme : "advanced",
            theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,|,cut,copy,paste,|,link,unlink,anchor,|,bullist,numlist,blockquote,|,outdent,indent,|,hr,image,spellchecker",
            theme_advanced_buttons2: "",
            theme_advanced_buttons3: "",
            theme_advanced_default_background_color : "#FFFFFF",
            spellchecker_languages : "+Dutch=nl,English=en",
            content_css : "<?php echo APP_MAIN; ?>css/<?php echo APP_SITE; ?>.css",
            remove_script_host : false,
            relative_urls : false,
            save_enablewhendirty : true
        });
    [removed]

load it with
Code:
<script type="text/javascript" src="http://domain/my_js.php"></script>



have you tried this?


Messages In This Thread
Parsing php in javascript - by El Forum - 12-24-2010, 05:10 AM
Parsing php in javascript - by El Forum - 12-24-2010, 05:25 AM
Parsing php in javascript - by El Forum - 12-24-2010, 06:10 AM
Parsing php in javascript - by El Forum - 12-28-2010, 09:02 AM
Parsing php in javascript - by El Forum - 12-29-2010, 05:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB