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 (Text):
    <!--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. Advertisements

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,146
    Magnus Blomberg
    Feb 20, 2006
  2. Dmitri Fedoruk
    Replies:
    4
    Views:
    886
    Dmitri Fedoruk
    Sep 14, 2007
  3. Emanuele D'Arrigo

    Restricted Execution of untrusted code

    Emanuele D'Arrigo, Oct 30, 2008, in forum: Python
    Replies:
    7
    Views:
    448
    Emanuele D'Arrigo
    Nov 19, 2008
  4. Tomas Mikula
    Replies:
    8
    Views:
    896
    Teraposa Lunodas
    Nov 24, 2009
  5. Knut Krueger
    Replies:
    11
    Views:
    1,066
    Jeff Thies
    May 3, 2011
  6. David Pyper

    Problem with web.config access-restricted subdirectory

    David Pyper, Jan 21, 2004, in forum: ASP .Net Security
    Replies:
    3
    Views:
    489
    David Pyper
    Jan 27, 2004
  7. Magnus Blomberg

    Simple website with open and restricted area

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