Link to home
Start Free TrialLog in
Avatar of 66866
66866Flag for United States of America

asked on

How to call an external httphandler using Jquery

Here's my situation
I have a customer facing website that show's customer information. I would like to get the user id (through a handler) using a jquery call so that i can capture that information for web analytics. the javascript file does not belong to the same project as the customer. in the traditional examples, i have seen where the request to a handler takes place within the same project. however in my situation i want to know how can i call the handler outside of the project. I have attached the code that i am currently using. everytime the return is 'undefined'
Any quick response would be very much appreciated.
function getGUID(customerurl) {
    var handler = "http://" + customerurl + '/userguidhandler.ashx?callback=?';
    $.getJSON(handler, function (getData) {
        return getData;
    });

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Kumaraswamy R
Kumaraswamy R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 66866

ASKER

Thanks for your help. Here's our how I resolved the issue
. http://www.ibm.com/developerworks/library/wa-aj-jsonp1/