Hello,
Im working on my content management system and for my site for support for it i was going to use a javascript drop down menu under the banner in the header.php file. The header file is saved as a PHP but uses all HTML because its basic and i figured it would be easiest for other people to create templates for the CMS. But for the javascript i plugged it into the Header.php and it wouldnt work... actually it doesnt show up at all. Idk why ive never had this problem before but the javascript in the header.php calls for the information from a file called menu.js, and also 5 other files which set it up to work on each type or browser. So i dont know what is wrong... ive tested it out in a html document both on my computer and on my server and it loaded fine in html form. But idk why it wont load in php... Any ideas??
Help with a Javascript in a PHP document
Moderator: General Moderators
Header.php
This is the header.php
Like i said it worked in an html document on both my comp and my server for me so it must be sumthing wrong in that PHP file[/quote]
Code: Select all
<html>
<head>
<style>
body { font-family: verdana; font-size:11px; color:#000000; }
table { font-size:11px; }
p { font-size:11px; }
a:link, a:active, a:visited {
color: #60ae02;
text-decoration: underline}
a:hover {
color: #2380be;
text-decoration: underline}
</head>
</style>
<body bgcolor='#2380be' topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="#.../banner.jpg"><tr><td>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="2380be" align="top">
<tr>
<td colspan="2" valign="top">
<img src="#.../aenima_01.jpg" width="950" height="50" alt=""></td>
</tr>
<tr>
<td>
<img src="#.../aenima_02.jpg" width="600" height="100" alt=""></td>
<td>
<img src="#.../aenima_03.jpg" width="350" height="100" alt=""></td>
</tr>
<tr>
<td colspan="2" valign="top">
<script language="JavaScript" vqptag="doc_level_settings" is_vqp_html=1 vqp_datafile0="menu.js" vqp_uid0=676388>cdd__codebase = "";cdd__codebase676388 = "";</script>
<script language="JavaScript" vqptag="datafile" src="menu.js"></script><script vqptag="placement" vqp_menuid="676388" language="JavaScript">create_menu(676388)</script>
</td>
</tr>
<tr>
<td colspan="2" valign="top">
<img src="#.../aenima_11.jpg" width="950" height="10" alt=""></td>
</tr>
</table></td>
</tr></table>
<table width='100%' border="0" cellpadding="5" cellspacing="0" bgcolor="2380be">
<tr valign='top'><td width='170'>Like i said it worked in an html document on both my comp and my server for me so it must be sumthing wrong in that PHP file[/quote]
is it wrapped in php tags?
is it echoing using >>>EOD that thing <---.....
like.. I guess.. the file using header.php, is it set to echo that stuff out using regular double quotes.....
also check menu.js is being linked correctly...
say index.php includes header.php and tries to get menu.js.... is menu.js in the same directory as index.php?
is it echoing using >>>EOD that thing <---.....
like.. I guess.. the file using header.php, is it set to echo that stuff out using regular double quotes.....
also check menu.js is being linked correctly...
say index.php includes header.php and tries to get menu.js.... is menu.js in the same directory as index.php?
Still no Luck
No it isnt wrapped in php tags... all the templates files are saved as .php but they use basic html... if it was in the php tag i would just use <<<HTML and html; but its just a basic html file... also the menu.js is in the same folder as the header.php so it should be working im clueless to why it isnt working
GOT IT!!!!!
hey i got it working i did what u said sorry i didnt read thuroughy before my first reply... i added the javascript files into the same location as the index, thx alot helped me alot since im under a deadline lol