I have a server with a .CGI on it than can be invoked by putting something like:

into the address bar of a browser. This displays a single line of text that is the value of the requested variable, like 1230667891 in this case.

I need to make a javascript on another server, that will access this .CGI on the first server, and rather than displaying the value, I want it to assign the output to a variable in my script.

I've been trying things like:

var cjul='<!--#exec cgi=""-->';

But I'm not having any luck. Any ideas would be much appreciated.