Ok guys, I have been looking around in the net for the solution and couldn't find it... Then I have been looking around the net for forums and I found this... I really hope you can help me with this... I am a webdesigner not a programmer so I don't know javascript except for very basics...
In my website I include a header with a JS file (header.js). Basically this header.js file contains lots of document.write("content" lines with my design.
I include the header.js file in my sites with a <script> call like this:
<script language="javascript" src="/header.js"></script>
Now I wanna ad a script to my pages (all my pages) so I wanna put it in the header to avoid editing over 100 pages. This script is written in perl and has to be called with a javascript call such as this one:
<script language="javascript" src="/cgi-bin/online.pl"></script>
I trid this:
document.write(" currently <script language=\"javascript\" src=\"/cgi-bin/usersonline/online.pl?tag=javascript\"></script> user(s) online"
and I tried this:
document.write(" currently "
src="/cgi-bin/online.pl">
document.write(" user(s) online"
and both do NOT work.
Of couse the script works fine when launched from plain html so I know that.
So therefore my question is: how can I put a script call usually called with a <script> call INSIDE a header.js file that is then recalled on all the pages with a <script> call too????
PLEASE HELP ME!!!
THanks in advance!
In my website I include a header with a JS file (header.js). Basically this header.js file contains lots of document.write("content" lines with my design.
I include the header.js file in my sites with a <script> call like this:
<script language="javascript" src="/header.js"></script>
Now I wanna ad a script to my pages (all my pages) so I wanna put it in the header to avoid editing over 100 pages. This script is written in perl and has to be called with a javascript call such as this one:
<script language="javascript" src="/cgi-bin/online.pl"></script>
I trid this:
document.write(" currently <script language=\"javascript\" src=\"/cgi-bin/usersonline/online.pl?tag=javascript\"></script> user(s) online"
and I tried this:
document.write(" currently "
src="/cgi-bin/online.pl">
document.write(" user(s) online"
and both do NOT work.
Of couse the script works fine when launched from plain html so I know that.
So therefore my question is: how can I put a script call usually called with a <script> call INSIDE a header.js file that is then recalled on all the pages with a <script> call too????
PLEASE HELP ME!!!
THanks in advance!