Forum Moderators: coopster
The javascript is as follows:
<script type="text/javascript" src="http://forms.example.com/form/86/1985011386.js"></script>
And my index.php is as follows:
<?php
/**
* Sites index page
*
* File showing the home page of the site.
*
* PHP version 5.0
*
* @category###Framework###
* @package###Index###
* @author
*/
/**
* File having common configuration variables required for the entire project
*/
require_once('common/config.inc.php'); //configurations
require_once('common/configs/config_video.inc.php');
require_once('common/configs/config_photo.inc.php');
$CFG['db']['is_use_db'] = true; //reset any global vals
$CFG['lang']['include_files'][] = 'includes/languages/%s/index.php';
$CFG['html']['header'] = 'includes/languages/%s/html_header-NEW.php';
$CFG['html']['footer'] = 'includes/languages/%s/html_footer.php';
$CFG['mods']['include_files'][] = 'common/classes/class_FormHandler.lib.php';
$CFG['mods']['include_files'][] = 'common/classes/class_MediaHandler.lib.php';
$CFG['mods']['include_files'][] = 'common/classes/class_RayzzHandler.lib.php';
$CFG['page']['middle'] = 'general/index.php';
require($CFG['site']['project_path'].'common/application_top.inc.php');
//require_once('general/index.php');
?>
---------------------
Can you show me how to place it correctly in the index.php page? Or should it actually go into one of the other pages like "includes/languages/%s/index.php"?
Thank you so very much for your assistance.
[edited by: eelixduppy at 6:09 pm (utc) on May 20, 2008]
[edit reason] please use example.com [/edit]
I am not exactly sure what you are looking for. If you want to add javascript to a php page you have two options. You can echo out the javascript from php itself using print() or echo(), or you may close the php tags and use the javascript how you normally would on a regular html page.
<?php or after ?>:
<script type="text/javascript" src="http://forms.example.com/form/86/1985011386.js"></script>
Or add the following between those two tags:
echo '<script type="text/javascript" src="http://forms.example.com/form/86/1985011386.js"></script>';