Elxis CMS Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Bug reports and fixes
 
Pages: [1]
  Print  
Author Topic: folder path  (Read 884 times)
1050
Newbie
*
Offline Offline

Posts: 33


« on: June 27, 2012, 14:42:12 »

Hi,
I want to write an ajax module, and I want to include ajax_new.js in my php file, it's on
/administrator/include/js/ajax_new.js
how should I wirte the path?
I find this it in one of your ajax topic :
<script type="text/javascript" src="includes/js/ajax_new.js"></script>
but it didn't work for me
thank you Smiley
Logged
datahell
Elxis Team
Hero Member
*****
Offline Offline

Posts: 7681



WWW
« Reply #1 on: June 27, 2012, 19:18:35 »

<?php echo $mainframe->getCfg('live_site'); ?>/administrator/....
or
<?php echo $mosConfig_live_site; ?>/administrator/....

Tip: you can alternative write your own ajax script without using the ajax sack library which works fine, but it is an old script.

Note for Elxis 4.0 Nautilus
The "live site URL" is now provided by the "URL" configuration option:
$live_site = eFactory::getElxis()->getConfig('URL');

But for scripts/stylesheets/images inclusion we strongly suggest to use the secureBase method which automatically switches to https on SSL/TLS protected pages:
$live_site = eFactory::getElxis()->secureBase();

And the link to site's frontpage:
$frontpage_link = eFactory::getElxis()->makeURL();
or
$frontpage_link = eFactory::getURI()->makeURL();
« Last Edit: June 27, 2012, 19:31:53 by datahell » Logged

Pages: [1]
  Print  
 
Jump to: