• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SoftPhone detection using XMLHttp

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
not sure where this should go...how about the intermediate forum
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic