deadlock Message Board
[ August Full List | Reply ]

Re: Problem with a Javascript question&answer script
From Inachu at Help Desk Club on 19 August '00
replying to Problem with a Javascript question&answer script posted by Gwen

I know a little but it seems you are try to create a counter...

The way the code looks like it seems you want to count visits
of the page and show the results.

What you have will only work local once they visit and will not be a true web counter. SO bob in Texas might have 400 hits but you still
only see 10. I think the best way for you to use a counter if you just want it to be local and not a true website counter then I sugjest
that you use cookies that will store their past visits and then it will count from them.


What is your true goal though? A server side counter or client side?


Inachu



>I keep reading different tutorial on javascript but I can't
>find an answer. Below is a script I need so badly but it
>won't work. I have tried to change answer(who.value) to
>result(who.value) and ans(who.value) but it will not
>recognize the array I made ans[]
>I know for someone that knows javascript instead of
>trying to learn as I go, this may seem easy and a
>silly question. But I really need to find the answer.
>
>
>function answer() {
> result=""
> for (var i=0; i<ans.length; i++) {
>
result = ans[i]
> }
>
>}
>
>var reset=""
>
>
>// -->
></script>
></head>
>
><BODY>
>
>
><FORM name=question>
><TEXTAREA COLS=40 ROWS=3 WRAP="hard" name=who value="">




Reply to this message

Required Details
Your name:
Subject:

Optional Details
Home page title:
Home page URL:
Email:
(if you'd like to receive automatic replies by email)

Your Message