views:

241

answers:

1

hello, I'm having a problem trying to get working those 2 plugins together: Localisation (for translating the javascript) and facebox (everyone knows that one right?)

I can make them work separately without any problem, but when the localisation plugin is loaded and I clic on a link that launches a facebox modal, the ajax request start, the facebox modal window shows up (with the loading gif) and directly the request is aborted (URL turns red and the word "aborted" appears, in firebug)

In firefox's error consol it says: "setting a property that has only a getter" and points to the file: jquery-1.4.min.js, line 126 (I've checked, and it gives the same error with jquery 1.3.2)

And here is my code:

$(document).ready(function() {
    $.localise('idioma', {language: AmigoPoints.lang, path: AmigoPoints.baseHref + '/public/js/jquery/'});
    //añadir /format/html/ a los href para que sea AJAX para ZF
    $('a[rel*=facebox]').each(function() {
        this.href += '/format/html';
    })
    // inicializa el plug-in que lanza nuevos links en ventanas modales
    jQuery('a[rel*=facebox]').facebox();
})

Since the error is in the jquery file, I don't know where to look to try to solve this issue: I suppose that the error is in my code, but I can't see it. Any thougts anyone?

A: 

well, i found a "solution". Instead of using the localisation plugin I load the language file acording to the user's language preference directly in my web page. I think the problem comes from the fact that the plugin loads the language file with an ajax request, and as it is a file (as oposed at a normal request) jquery has trouble to perform a normal AJAX request after that. Maybe there is a way to avoid this behaviour, if anyone knows please tell me. Anyway, I know have my javascript translated and the facebox plugin working, so I'm happy. Thanks to Adam and Pointy for their advices. see you

david parloir