Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Some FrontPage (counter)

Posted on 1998-05-31
13
Medium Priority
?
243 Views
Last Modified: 2013-12-25
Hi
I'm looking for a smart way to inspect some counters from a web site with FpExtensions. I have tryed to "include the cnt file into an HTML file... however this does'nt work. Also try to open that particular cnt file in the web browser does'nt work, even if I set the Netscape options to open the notepad.exe for files with cnt extension.

Also:
Does anyone have experience on running a larger number of counters (more than 100)  with Frontpage? If yes, is working in a proper way?

Cheers
Jörgen Aström
0
Comment
Question by:jastroem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 1

Expert Comment

by:TAMC
ID: 1856880
The easiest way to do this would be to use some script, either javascript or vbscript, even better you could write asp, tell me which so I know which to write.
0
 

Author Comment

by:jastroem
ID: 1856881
Hi, and thank you for your answer.

Actually it doesn't matter in what way it is done...
What I want is to view just any kind of counter file (simple files only containg a number)
within my browser. If it's a script or an asp solution is not that important.

Please tell me how many points you expect for a "job" like that. And please also tell what you need to know about my server envirments.

Best wishes
jörgen Aström
0
 
LVL 1

Accepted Solution

by:
TAMC earned 200 total points
ID: 1856882
Well first of all if I am going to write this in ASP your server has to be running IIS 3.0 and has ASP installed, comment me back, and I'll start writing the ASP script.  I guess a 100 points will do.
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 1

Expert Comment

by:TAMC
ID: 1856883
Here, this worked on my machine, with IIS 3.0 and ASP installed, if this isn't up to your specs just comment me thanks.

Notes: change the line OpenTestFile("C:\boot.ini") to the path of the cnt file you want to open, also besides ReadAll there is ReadLine, and just Read, if you would rather use those, just comment me again.

<% @ LANGUAGE="VBSCRIPT" %>
<%
 OPTION EXPLICIT
 Dim file,filesystem,text
%>
<HTML>
<HEAD>
</HEAD>
<BODY>
<%
  Set filesystem = CreateObject("Scripting.FileSystemObject")
  Set file = filesystem.OpenTextFile("c:\boot.ini")
  text = file.ReadAll
  file.Close
  Response.Write text
%>
</BODY>
</HTML>
0
 

Author Comment

by:jastroem
ID: 1856884
I will try it. Tell me do just have to cut'n paste the code into an html file?
The problem might be the path to the files. Actually this is my main problem in some cgi I'm trying out right now... My server is a virtual server and it's so confusing to find out the proper way to my dierctorys. (it is a NT 4 Server IIS and I should be able to run ASP on it)

Thanks / Jörgen
0
 
LVL 1

Expert Comment

by:TAMC
ID: 1856885
What is in my answer is a whole file, it will work on its own.  If you want to incorporate it in to your own HTML file do this:

1) Put the following code at the top before anything else, again change boot.ini to the path of your file on the server if its in the same directory you can just put the file name(just like images):
   <% @ LANGUAGE="VBSCRIPT" %>
   <%
    OPTION EXPLICIT
    Dim file,filesystem,text
    Set filesystem = CreateObject ("Scripting.FileSystemObject")
    Set file = filesystem.OpenTextFile("c:\boot.ini")
   %>
2) Put the following code where you want to display the counter information.
   <% text = file.ReadAll
      Response.Write text %>
3) Put this when your done with the counter information
   <% file.Close %>
4) Rename the file to have an .asp extension (otherwise it won't work)
5) Put the file in a directory where you have read and execute rights(Might work in your cgi-bin directory?)
6) Hurray! should work, if not, comment again.

0
 

Author Comment

by:jastroem
ID: 1856886
I will try it. Tell me do just have to cut'n paste the code into an html file?
The problem might be the path to the files. Actually this is my main problem in some cgi I'm trying out right now... My server is a virtual server and it's so confusing to find out the proper way to my dierctorys. (it is a NT 4 Server IIS and I should be able to run ASP on it)

Thanks / Jörgen
0
 
LVL 1

Expert Comment

by:TAMC
ID: 1856887
Huh, your repeating yourself.
0
 

Author Comment

by:jastroem
ID: 1856888
I will try it. Tell me do just have to cut'n paste the code into an html file?
The problem might be the path to the files. Actually this is my main problem in some cgi I'm trying out right now... My server is a virtual server and it's so confusing to find out the proper way to my dierctorys. (it is a NT 4 Server IIS and I should be able to run ASP on it)

Thanks / Jörgen
0
 

Author Comment

by:jastroem
ID: 1856889
I will try it. Tell me do just have to cut'n paste the code into an html file?
The problem might be the path to the files. Actually this is my main problem in some cgi I'm trying out right now... My server is a virtual server and it's so confusing to find out the proper way to my dierctorys. (it is a NT 4 Server IIS and I should be able to run ASP on it)

Thanks / Jörgen
0
 

Author Comment

by:jastroem
ID: 1856890
I'm sorry I thought I could only reload this window to see if there's an "answer" from you.
Please forgive me for your unconvinence...
0
 

Author Comment

by:jastroem
ID: 1856891
Here's the result of my tests:

The server returns this (in German)
Laufzeitfehler in Microsoft VBScript-Fehler '800a004c'
Pfad nicht gefunden
/cgi-bin/test.asp, Zeile 6

It says Runtime Error in Microsoft...
path not found
/cgi-bin/test.asp, line6

And here's the asp doc (named test.asp):

<% @ LANGUAGE="VBSCRIPT" %>
<%
           OPTION EXPLICIT
           Dim file,filesystem,text
           Set filesystem = CreateObject ("Scripting.FileSystemObject")
           Set file = filesystem.OpenTextFile("_private/home.htm.cnt")
          %>
<html>

<head>
<title>TEST</title>
</head>

<body>
<% text = file.ReadAll
             Response.Write text %>
<% file.Close %>
</body>
</html>

___________________________

I have put the test.asp into my cgi-bin folder.

Any smart hints?

Thank you in advance
0
 
LVL 1

Expert Comment

by:TAMC
ID: 1856892
I will get back to you by the time EE says its 5:00 pm.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question