I have a server with a .CGI on it than can be invoked by putting something like:
http://172.16.0.78/variable.cgi?variable=current_julian

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="http://172.16.0.78/variable.cgi?variable=current_julian"-->';

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