javascript - need baseurl in config.js file -


in config.js file (pasted below), need base url php base url script have used doesn't work. suggestions on can use replace php base url below ?

bobbieeditor.editorconfig = function( config ) {     config.fileopener = '<?php echo $this->baseurl;?>files/browse.php?opener=bobbieeditor&type=files'; }; 

can put value of $this->baseurl; in metas example:

<!doctype html> <html> <head> <meta name="data-base-url" content="<?php echo $this->baseurl;?>" /> 

and js:

var base_url = document.queryselectorall('head > meta[name="data-base-url"]'); var base_content = base_url[0].getattribute('content'); 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -