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.
Thank you for your reply, but I'm still having trouble. When I run this, I should always get an alert window, shouldn't I? That isn't happening. And if I try a line like
document.write('<br>Text: '+html);
after executing the function, I get an error message saying html is undefined.
I'm sorry I don't know what regex is, but I did load the prototype framework v1.6.0.3 onto the server.
Also, when I was trying to learn what Ajax is, I saw this on a tutorial:
Did You Know? As a security measure, the XMLHTTPRequest object can generally only make calls to URLs within the same domain as the calling page and cannot directly call a remote server.
This makes me wonder if this even has a chance of working. What do you think?
Bookmarks