Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ajax blocked

Status
Not open for further replies.

dexeloper

Programmer
Oct 26, 2004
162
GB
Would anyone know what restriction can be put on a browser that prevents Ajax working. The site can be seen at

It's failing on the clients' machines. Javascript is enabled because the page loads fine and the options work. However when they do a search it just hangs and this is where the first Ajax request is made.
I'm using the Yui toolkit.
 
They may have some 3rd party toolbar installed. They may have some malware that is breaking it. They may have a restricted network policy.

If you are talking IE (less than 7) then it could be that they have a different version of the javascript engine (these are periodically updated as part of some hotfixes for windows).

The version of IE6 I have on my desktop here shows the following detail when I get the About info:

Version: 6.0.2900.2180

What version do you see on the affected machine (assuming it's IE6 for instance)?

Can you make a tiny test harness that just shows the specific problem (without any of the other code on the site)? If so, it will be easier to identify the problem.

I'm sure you will come back with some answers - allowing us to get closer to an answer for you.

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Well I've created a page:


This makes an Ajax type request and gets the response. On the client where Ajax isn't working he just gets the first alert but then nothing.
Could it be a setting in the browser?
 
Could it be a setting in the browser?
Yes.

So, without knowing any more about what browser or specific version (as described above), I can't really do much more.

Looking at the code you have, I would hilight the use of undefined in your tests:
Code:
if(o.responseText !== [!]undefined[/!])

If you are using a IE 5 for Windows (or indeed the Mac), then undefined is not defined (oh how ironic) and cannot be used in the way you use it above. Instead you could try using this method:
Code:
if(typeof(o.responseText) != "undefined")

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Get something like firebug or iehttpheaders to debug what's being sent & received. Is the request actually being sent to the server, do you get a response? Is your javascript handling the response? I reccomend liberal use of alert();!

Ben

----------------------------------------------
Ben O'Hara
David W. Fenton said:
We could be confused in exactly the same way, but confusion might be like Nulls, and not comparable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top