$.getScript is causing this strange error, I’m not sure why it is causing an error loading each character in the url as a seperate request. I’ve seen this before but not can’t remember why it is doing it. Any ideas?!?! $.getScript() loading each character in the url…

getscript-error

$.getScript('http://domain.com/views/pc/js/ext/jquery.livesearch.min.js', function()
{
      //do something once the script has loaded...
});

But…

Full ajax call works!

$.ajax(
{
    type: 'GET',
    url: 'http://domain.com/views/pc/js/ext/jquery.livesearch.min.js',
    success: function(data)
    {
        log(data);
        //do something once the script has loaded...
    },
    error: function(xhr, textStatus, errorThrown)
    {
        alert('ajax loading error... ... '+widgetId+' '+contentUrl);
        return false;
    }
});

Any ideas???

Sam Deering Sam Deering
Sam Deering is a Front-end Web Developer who specialises in JavaScript & jQuery. Sam is driven and passionate about sharing his knowledge to educate others.

  • http://www.itarticle.net/ ITarticle

    Thanks for the code….

  • http://www.facebook.com/profile.php?id=100000606151004 Tomas Katysovas

    that’s the most funny error I’ve ever seen :)

Stay ahead of the game Exclusive content for developers and digital experts Go Premium