Problem getting javascript code working on js restricted website

Discussion in 'Javascript' started by Richard Silverstein, Sep 18, 2003.

  1. 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
     
    Richard Silverstein, Sep 18, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Magnus Blomberg

    Simple website with open and restricted area

    Magnus Blomberg, Feb 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,020
    Magnus Blomberg
    Feb 20, 2006
  2. Tomas Mikula
    Replies:
    8
    Views:
    661
    Teraposa Lunodas
    Nov 24, 2009
  3. Knut Krueger
    Replies:
    11
    Views:
    875
    Jeff Thies
    May 3, 2011
  4. Magnus Blomberg

    Simple website with open and restricted area

    Magnus Blomberg, Feb 20, 2006, in forum: ASP .Net Security
    Replies:
    2
    Views:
    169
    Henning Krause [MVP]
    Feb 21, 2006
  5. Kausar Parveen
    Replies:
    4
    Views:
    244
    Kausar Parveen
    May 31, 2006
Loading...

Share This Page