Forums Archive Index > Cool free scripts > Showing text?

Author: hmmz

Date: 28 Apr 2005 8:17 pm

Hi,

I have uploaded the .js file to my host and included the file in my index.php
(include "v_newsticker_1.js";) and its showing the content of the .js file! instead of what it should display (box+inputted content)

help? :cry:

EDIT: NVM the above lines, i forgot to put it in the head, just 1 more question though, is there a way to include the file? cause its a humongous amount of text, and to put it in the head section of index.php...i rather take an alternative :D


Author: smartmenus
Subject: Re: Showing text?

Date: 29 Apr 2005 2:24 am

hmmz wrote:
EDIT: NVM the above lines, i forgot to put it in the head, just 1 more question though, is there a way to include the file? cause its a humongous amount of text, and to put it in the head section of index.php...i rather take an alternative :D
To include the file just change the extension to .php (e.g. v_newsticker_1.php). Then add the following 2 lines at the beginning of the v_newsticker_1.php file:

Code:
<script type="text/javascript" language="JavaScript1.2">
<!--


and then add the following 2 at the end of the file:

Code:
//-->
</script>


After that you can include the file as a regular php include.