StatCounter User Forum  
StatCounter Free web tracker and counter

Go Back   StatCounter User Forum > StatCounter.com > Help

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 08-23-2006, 01:35 AM
lrashley lrashley is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Question StatCounter Javascript in Adobe Acrobat documents?

Hi. I'd like to post a .pdf version of a page I have previously posted on my website as an html document--I'm unhappy with my design and formatting options in html (because I am not anything other than minimally capable with my webpages). But I would like the StatCounter code to count my page hits for the document. I read the forums which suggested making an html page and then linking the .pdf from there, which seems like about one step more than I would want to do as a user.

So I thought, well, maybe I can embed the javascript in the Acrobat document. I found this site:

http://studio.adobe.com/us/tips/tip....cr6kbjavascrpt

which includes instructions on how to execute a javascript when a document opens, exactly what I want. So I created a .pdf document, opened Page Properties and set up a trigger action, but when I paste in the StatCounter javascript and hit OK, I get a message the following error message in Acrobat:

SyntaxError: syntax error
2null) at line 3

and that's a colon followed by a ( , not a frowny face (although I do feel that way when I see the error message)

Line 3 is <script type="text/javascript" language="javascript">

I tried several other ways to insert the javascript code, but got the same message with those other methods as well.

Alas! Does anybody have any smarter ideas than this dud?
Thanks.
Lisa
  #2  
Old 08-23-2006, 01:38 AM
lrashley lrashley is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Default and by the way . . .

I should have mentioned I've been using StatCounter since around October 2005 and have had NO problems with it that whole time. It's wonderful for what I do.
Thanks!
  #3  
Old 08-23-2006, 02:18 AM
webado's Avatar
webado webado is offline
Moderator
 
Join Date: Apr 2004
Location: Montreal, Quebec, Canada
Posts: 28,172
Default

You cannot do it that way. You really only can do it with the intermediate html page. Top of the help forum has a method for that.

You would only be able to do what you were trying to do with a javascript function. The Statcounter code cannot be used as a function.

It can only be used from within an html page and it logs the hits to that html page.
__________________
Christina
>>Forum Moderator<<

Please do not PM me for support. The forum is here for that.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:43 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.