Problem getting javascript code working on js restricted website

  • Thread starter Richard Silverstein
  • Start date
R

Richard Silverstein

I have a photo gallery at pbase.com
(http://www.pbase.com/richards1052/). I'm trying to add a
sitemeter.com hit counter which uses javascript code. However, it
appears there are some Javascript restrictions on PBase to avoid
harming code.

A pbase member told me I could do the following:

"1. Put your Javascript code into a file with .js extension. Use a
real code editor: Visual, Dreamweaver... Don't forget to remove html
tags from it: <script>...

2. Copy into an account on the web you can access, there are some free
ones.

3. In PBase code, don't write your javascript, instead, link to the
..js file you created, it sould be working."

Since I'm not a js expert, I'm having trouble following his
directions. I've take the js code (see below) and saved it in a
Notepad file w. a js extension. But I didn't understand what he meant
by "remove tags." What specific tags need to be removed; should I
remove just the carats, the entire tags? I guess I didn't do this
part of the operation right because when I try to open the .js file I
get a Windows script host syntax error. I assume that means I haven't
edited the code right for it to be a true js file.

Next question I have is how should the link be forumlated in the
pbase.com template so that every time there is a visitor the hit will
be counted at sitemeter.com?

Here's my sitemeter.com html code before any editing:

Code:
<!--WEBBOT bot="HTMLMarkup" startspan ALT="Site Meter" -->
<script type="text/javascript" language="JavaScript">var
site="sm9pbase"</script>
<script type="text/javascript" language="JavaScript1.2"
src="http://sm9.sitemeter.com/js/counter.js?site=sm9pbase">
</script>
<noscript>
<a href="http://sm9.sitemeter.com/stats.asp?site=sm9pbase"
target="_top">
<img src="http://sm9.sitemeter.com/meter.asp?site=sm9pbase" alt="Site
Meter" border=0></a>
</noscript>
<!-- Copyright (c)2002 Site Meter -->
<!--WEBBOT bot="HTMLMarkup" Endspan -->

Can you tell me how it should look as a .js file & how precisey I
should "link to the .js file so that the hit counter will work.

Thanks, Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top