• Post Reply Bookmark Topic Watch Topic
  • New Topic

SoftPhone detection using XMLHttp  RSS feed

 
Wajid Ali Syed
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I am using following code to detect softphone installation in IE (using JavaScrip).


eyeCheck = new ActiveXObject("eyeCheck.Session");
alert('softphone brand name'+eyeCheck.Clients(0).Brand );

When I run this in FireFox its failing as ActiveXObject is not supported.
Can I get any help on this to make it work on FireFOx.
 
Bert Bates
author
Sheriff
Posts: 8954
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not sure where this should go...how about the intermediate forum
 
Doug Slattery
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bert Bates:
not sure where this should go...how about the intermediate forum


LOL! This was way ot for scjp.

This sounds like an AJAX thing. Try Googling for XMLHttpRequest().

Firefox and Netscape don't support ActiveXObject(). They instead use XMLHttpRequest().

Hope this helps...
Aloha,
Doug

-- Nothing is impossible if I'mPossible
[ October 18, 2007: Message edited by: Doug Slattery ]
 
Wajid Ali Syed
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried with XMLHttpRequest as below:
var httpObj=new XMLHttpRequest();
httpObj.onreadystateChange= handleResponse();
httpObj.open("GET","eyeCheck.session");
httpObj.send();

function handleResponse(){

if ((httpObj.readyState == 4) && (httpObj.status == 200)) {


alert ("response:"+ httpObj.responseText);

}

}
This code is not working , getting null ;
 
Doug Slattery
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Wajid,

Originally posted by Wajid Ali Syed:
I tried with XMLHttpRequest as below:
var httpObj=new XMLHttpRequest();
httpObj.onreadystateChange= handleResponse();
httpObj.open("GET","eyeCheck.session");
httpObj.send();

function handleResponse(){
if ((httpObj.readyState == 4) && (httpObj.status == 200)) {
alert ("response:"+ httpObj.responseText);
}
}
This code is not working , getting null ;


I think one problem could be your httpObj.open(). There are 3 parameters to the function (i.e. httpObj.open("GET" -or- "POST", <url>, true -or- false). Is "eyeCheck.session" your request url?

You also should use httpObj.send(null) instead of httpObj.send().

Also, check that your xml response from the web server is formatted correctly and being sent back. You can use Odysseus to verify this (Sorry, I don't have the link atm).

I do remember it was fussy to get it working and also, the xml structures between ie and firefox are different, which means accessing the data will be different.

Let me know if this helps. If not, I'll see what other stuff I can dig out.

Aloha,
Doug
 
Wajid Ali Syed
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi All,
I could resolve this using navigator object .
Now I have got another problem, when I install any plugin from firefox It is not refelecting until I close the the browser and restart again.

Any solution to this problem?



Thanks a lot for all your help.
 
Doug Slattery
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Wajid,
Originally posted by Wajid Ali Syed:
hi All,
I could resolve this using navigator object .
Now I have got another problem, when I install any plugin from firefox It is not refelecting until I close the the browser and restart again.

Any solution to this problem?

Thanks a lot for all your help.


I don't think there is a way around this, especially if the plugin needs to install an updated dll.

Aloha,
Doug

-- Nothing is impossible if I'mPossible
 
Wajid Ali Syed
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Doug,
I could get that using navigator.plugins.refresh(), but in firefox this is causing the user session to expire.
I am getting an alert "the page you are trying to view contains POSTDATA....", if I say OK/Cancel either way its logging out the user from application.

Any hint here so that user sesssion is not expired.

Thanks
Wajid
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!