0

I am trying to use jQuery UI Autocomplete with a remote JSON source. Everything is working fine in FF and chrome, but in IE the Autocomplete dropdown does not trigger. I get a strange error:

SCRIPT5007: Unable to get value of the property 'call': object is null or undefine

Here is my code for autocomplete:

        $("#product").autocomplete({
         source: function( request, response ) {
            $.ajax({
                url: 'https://secure1.valuecentric.com/Portal/ds_products.cfm',
                type: 'GET',
                data: request,
                success: function( data ) {
                    // feeding back to jquery autocomplete 
                    response(data );
                }
            })
            },
        minLength: 1,
        autoFocus: true,
        select: function(event, ui){
            //alert(ui.item.id);
            query = ui.item.id;
            drawChart(ui.item.id);
        }
    });

You can see the issue live here: http://vciq.com/index.php/component/datastore/

Andrew Whitaker
  • 124,656
  • 32
  • 289
  • 307
thegreyspot
  • 4,079
  • 5
  • 28
  • 34

1 Answers1

1

It looks like you're doing a cross-domain request. If this is the case you'll have to use JSONP:

source: function(request, response) {
    $.ajax({
        url: 'https://secure1.valuecentric.com/Portal/ds_products.cfm',
        type: 'GET',
        dataType: 'jsonp',
        data: request,
        success: function( data ) {
            // feeding back to jquery autocomplete 
            response(data);
        }
    });
},

See the remote with JSONP example for a working example using JSONP.

Andrew Whitaker
  • 124,656
  • 32
  • 289
  • 307