Maren

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromMaren
ToMe
Subjectwriting webstats code into a .JS, tiny, really TINY script
Date27 September 2005 21:43
Hello,

as i was searching for reference on how to link a js file from another js
file I came across the following tutorial on your site,
http://www.howtocreate.co.uk/tutorials/javascript/writing

Of course i studied the article, and tried to apply what it says but being
as inexperienced at scripting as i am, i couldn't quite seem to get away
with it. The problem is, there are actually two scripts that somehow don't
function without one another, and i'd like to have them both embedded into
one .js.  However as long as they're both not adapted correctly i can't tell
where i did something wrong, so i hoped you could point me in the right
direction. It should be cake, i think?

This is the script as i have it on my pages, and how it  properly functions,
i also included the div tag i use to position it with.

<DIV STYLE="width:600px; text-align:right">
<script language="JavaScript" type="text/javascript" src="[URL]">
</script>
<script language="JavaScript" type="text/javascript" >
<!--
  foobar("someUniqueCode", 0);
// -->
</script>

I'm very curious as to how this should be written into a single JS file
which i can then link to on all pages using the source command. I'd send you
my failed attempt but dissecting that idiot wouldn't speed up your reply
service i'm afraid. In any case i'd be very thankful if you could help out!

Kind regards,
Maren
FromMe
ToMaren
SubjectRe: writing webstats code into a .JS, tiny, really TINY script
Date27 September 2005 23:02
Maren,

add this:
foobar("someUniqueCode", 0);
into the end of this file:
[URL]

then use this:

<div style="width:600px; text-align:right">
<script language="JavaScript" type="text/javascript"
src="[URL]"></script>
</div>


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromMaren
ToMe
SubjectRe: writing webstats code into a .JS, tiny, really TINY script
Date28 September 2005 00:03
Worked like charm, great! And fast too.. gosh :> many thanks.
Now I feel sorry that i didn't think of just downloading that heck file
myself, but, it's one of those things that i didn't expect could be done.  I
thought the trick had to be more -complicated-  or beyond my heavily finite
knowledge so to speak. Anyway, good luck with your site and other possible
endeavours, i appreciate what you're doing a lot.

Maren
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.