This could go in any number of other forums but it's not
exactly templating / FormsPublisher, nor workflow, nor Perl - so ...
Environment[indent]TS 6.7.2 SP (unsure) and/or TS 7.2
W2K3
Windows clients with either IE6 or Firefox 3.x[/indent]
Background[indent]We're calling a CGI script to do various processing steps on "finish" of a SitePublisher page (I believe the actual JSP was hacked to do this - before my involvement with this project). This script takes care of generating pages and getting them deployed to a QA server and then presents a prompt for the user to optionally publish the content to their production servers (>10) right then. A second CGI script is invoked if the user selects the option to "publish now" from the first CGI script. The second script [re-]generates .html files from .page files and kicks off a workflow (WFT) using iwwft_compile.ipl. The workflow then kicks off the actual deployment. This script is supposed to monitor a deployment log file and provide some feedback to the user at N-second intervals.[/indent]
Code Background[indent]I got the code working just like I wanted to, using Firefox to help with debugging.
The second script basically just renders a bunch of HTML code. Embedded within that HTML code is a bunch of Javascript code that make calls to server-side [non-windowing] CGI scripts to (again) do the page generation and start the workflow, and then invokes another server-side [non-windowing] CGI script to monitor the log file - in a timed loop until either the deployment completes or some maximum amount of time has elapsed.[/indent]
Issue[indent]The code, as written, works just fine in Firefox, but in IE6, the server-side scripts never get invoked. I used code from the w3schools as a reference for this, but it doesn't seem to help:[html]...
print qq(Content-type: text/html\n\n
...
<script type="text/javascript">
var xmlhttp = null;
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else {
// code for IE5, IE6
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
alert("XMLHTTP: " + xmlhttp); // #=#
...
xmlhttp.open("GET", "$prepscript", false);
xmlhttp.send();
xmldoc = xmlhttp.responseXML;
...
</script>
[/html]The alert shows an object when run on Firefox, but nothing (other than the static string) when run on IE6.
There is no syntax error - the code continues to run and eventually the looping reaches a threshold and displays a message to the user indicating as much.
The server-side scripts have a lot of debugging lines in them.
When run on firefox - all those lines show up in the log file.
When run on IE6 - none of those lines show up in the log file.[/indent]Does anyone see anything that I'm doing incorrectly here? Is there something else I should be using instead of
new ActiveXObject("Microsoft.XMLHTTP");
?
Any [reasonable] suggestions welcome.