Hmm... In order to have a counter or guestbook work, you need to be able to modify a file on a server somewhere to remember what has already been entered. Javascript cannot do this.

In both of the cases offered by Nesh, this was not done through javascript. In the first case, it was done through email, and in the second, through a CGI script. These are the actions that are taken when the form is submitted (hint- check the action element of the form tag). The javascript just does input validation before you submit.

It's easy to get a counter; it just has to be hosted on a machine which allows CGI scripts. such counters are freely available on the web, such as here

The only way for you to get a guestbook working is to either find an email based guestbook system and run a cron job or something that updates the guestbook when you get new mail, update the guestbook by hand yourself when you get the email, or find someone else to host your guestbook on a machine which hosts guestbooks. I haven't heard of such a thing, probably because guestbooks require a lot more resources than a counter, and people want to have more control over how they work.


In reply to Re: CGI not accepted by server. by Alokito
in thread CGI not accepted by server. by anmaco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.