Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:51
PHP include of menu not working
Poster: gjensen
Dated: Monday March 7 2005 - 2:41:19 GMT
What is the best way to seperate my js code from the rest of my code? I have tried to do a PHP include without success. Interestingly the code still shows up in the browser source, but not in the browser display.
If I embed the JS in the file all is fine.
Please advise.
Poster: Ruth
Dated: Monday March 7 2005 - 3:01:02 GMT
I know the Milonic site is php, I don't know if they use includes, but I do know they rename the menu_data.js file to menu_data.php. I really don't know about php, so I'm not sure if that addresses your issue. Or if you are asking what the include code would be to include a js file?
Code:
<?php include("js_file.inc"); ?>
Is one I saw on a search, but since I got that on a search I have no clue if it's even correct
Ruth
partly works
Poster: gjensen
Dated: Monday March 7 2005 - 3:38:32 GMT
I changed the name of the JS files to PHP and I can include those files.
but I still needed Milonic specific code down further in the content inorder to embed the menu at a certain location of the page layout. This is the code that shows up in the browser source, but will not work unless I put it statically into the file. Which would be tedious to maintain if i want to reuse that code in other files.