Skip to content Skip to sidebar Skip to footer

Jquery Function Preventing Rails Remote Call

I have a link on my page which makes an AJAX remote call to passcheck_path and the p tags around it provide the function of activating a JQuery modal box which covers the entire pa

Solution 1:

The jqModal plugin you use unbinds all the click handlers defined on your link, also the ones by rails.

So either you switch plugins to another one or jqueryui modal dialogs because jqModal seems quite outdated, or you can implement a workround by calling remotely with the onShow callback of jqModal:

$('.blackoutwindow').jqm({
    modal: true,
    onShow: function() {
        $.get($(this).attr('href')); // DIY Implementation of the remote call
    },
    trigger: '.blackout',
    overlay: 100
});

Have a look at this fiddle to see the problem and the solution

Post a Comment for "Jquery Function Preventing Rails Remote Call"