Peter: JavaScript cgi call with return value

I have a cgi script on my server which returns a single number (checkmail.cgi). This number may have 2 values, 0 and 1, identifying the status of a mail box on the server:

0: no new messages
1 : new messages

On the client-side, I am using JavaScript in a HTML page.

The JavaScript should call the checkmail.cgi, and should put the return value into a variable, and should take corresponding actions.

Which JavaScript function or command or method can perform such a http call to checkmail.cgi on the server?

Any help is very much appreciated.

Peter

  1. hallo Peter,

    I have a cgi script on my server which returns a single number (checkmail.cgi).

    And the script is Perl or what is it?

    On the client-side, I am using JavaScript in a HTML page.

    Nice, but you've it on _client-side_, and your cgi is on _server-side_. Javascript cannot work on your server, you know.

    The JavaScript should call the checkmail.cgi

    How it should do this? Without any scriptcodings we have to call our glass-balls ...

    But, however, there we're in a _german_ room. So please, ask in our language, cause without it not all can understand and help you.

    Grüße aus Berlin

    Christoph S.

  2. Vielen Dank XaraX bzw. eddi, das ist genau das wonach ich gesucht habe.

    Mit der Antwort von Christoph Schnauß konnte ich nicht viel anfangen, hätte er sich sparen können. Mensch Christoph.

    Peter