Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Problem with ASP Hit Counter
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with ASP Hit Counter

 Post Reply Post Reply
Author
AyChihuahuas View Drop Down
Newbie
Newbie
Avatar

Joined: 26 November 2006
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote AyChihuahuas Quote  Post ReplyReply Direct Link To This Post Topic: Problem with ASP Hit Counter
    Posted: 26 November 2006 at 9:21pm
Hi there. I hope someone can help me. I am BRAND NEW to ASP and no next to nothing about it. I do know enough html to get me by tho and I hope someone here will be able to walk me through my problem.

I am trying to use the Web Wiz ASP Graphical Hit Counter. I have followed the tutorial but the tut tells me to save my script as an .asp file. I have uploaded it to my server and it works great when I load the page.... The only problem is that I want the counter to appear on my index page. My site won't load as asp file as the initial page....

Am I making any sense?

You can view the asp file and see that it is working fine at http://www.aychihuahuas.com/index.asp and see what I want my index page to look like but I dont know how to embed the asp in an .html page and get the counter to be viewed like the free counter is at http://www.aychihuahuas.com/index.html

Can anyone offer me a glimmer of hope? Any and ALL input will be GREATLY appreciated.

Sincerely,

- Bill
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2006 at 11:42pm
A page with asp code has to have a .asp extension to clue the server to run the code before displaying the page. A .htm or .html page won't run the asp part.

You can mix html and asp code in a page that ends with .asp by putting the code between <% and %> tags. e.g. - Save the following code as test.asp and run it on your asp server
<html>
<head>
<title>Demo of how to mix asp and hrml.</title>
</head>
<body>
<p> this is produced by regular html</p>
<%
Response.Write "<p>This is produced by asp code - Server Time is - " & now() & "</p>"
%>
</body>
</html>



Edited by dpyers - 26 November 2006 at 11:44pm

Lead me not into temptation... I know the short cut, follow me.
Back to Top
AyChihuahuas View Drop Down
Newbie
Newbie
Avatar

Joined: 26 November 2006
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote AyChihuahuas Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2006 at 11:53pm
So basically to have an ASP counter it would have to be it's own page with a link to it if someone wanted to view how many hits I've had?
 
I came up with a solution anyway... I embedded the asp page (which has only the counter) into my index page with an <iframe> tag.
 
Thanks for the help anyway.
 
- Bill
Back to Top
javi712 View Drop Down
Senior Member
Senior Member


Joined: 22 May 2003
Location: United States
Status: Offline
Points: 488
Post Options Post Options   Thanks (0) Thanks(0)   Quote javi712 Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2006 at 3:00pm
It doesn't have to be in its own page. All you would have to do is rename the .html extension of your index page to an .asp extension. Once that's done, you can integrate your asp code into that page and have the browser properly display it.
Back to Top
AyChihuahuas View Drop Down
Newbie
Newbie
Avatar

Joined: 26 November 2006
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote AyChihuahuas Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2006 at 10:24pm
I understand that I can rename the html page to an asp... The only problem is that I want it on my index page and my index page HAS to be .html or .htm or else it wont display....
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 28 November 2006 at 12:04am
If your web server supports asp, either index.asp or default.asp should work. Usually there's a ordered list of page names/extensions. First on the list takes precedence so if you have both a default.html and a default.asp page, the default.html would display. On iis, default.x takes precedence over index.x by default although that can be overr ridden.

If you're using HSphere control panel, you can turn on indexes for the domain and set your own precedence list that overrides any iis settings.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.