sk said the following on 7/18/2006 6:34 PM:
Quote:
I create some javascript to send some search request.
However, on some machines i wont' be able to send
request. What could be the reason?
Several.
The browser doesn't support the HTTPRequest Object.
The browser doesn't allow ActiveX.
You are using limited HTTPRequest code.
Quote:
function sendSearchRequest()
{
var srch_url = "/servlet/Search";
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = null;
If the browser doesn't support Msml2.XMLHTTP or Microsoft.XMLHTTP then
your code fails silently. There are MSIE's with other versions of
XMLHTTP support and no non-IE browser supports your code.
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq & newsgroup weekly
Temporarily at:
http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/