Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Browser not supporting Autocomplete

 
darshan karle
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everybody,

I am implementing Ajax Autocomplete in my project. problem is Internet Explorer 7.0 is not supporting Ajax.It works fine with Firefox.Can any body please tell me what is the problem.i will paste java script here.


[ May 30, 2008: Message edited by: Eric Pascarello ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does it not support? The XMLHttpRequest Object? What error messages are you getting? Have you tried to debug it and see where the code is failing? Does it work for one letter and stop working after that?

A little bit more details will go a long way to help you getting an answer.

Eric
 
darshan karle
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello eric,

sorry for the delay.

before using Firefox i was trying with IE7.0 and it was failing to create XMLhttp request object.i figured it by putting alert messages inside try catch where i was creating Http Object.it was displaying error messaga saying "browser dosenot support AJax " . After that i installed firefox and it created XMlHttp request object and my code is working fine.
Even now if i try to create XMLHttp request Object using IE7.0 it is not working .

do tou any idea why it is not working

regards
darshan
 
Angelo Quaglia
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One problem is that the script you posted does not set the variable isIE.
You should add this as the first line of the init() function:
isIE = (window.ActiveXObject);

Once isIE is set it will create the request as:
req = new ActiveXObject("Microsoft.XMLHTTP");
instead of:
req = new XMLHttpRequest();
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic