So I have django 1.5.1 installed,
have persistent messages installed, and have messages displaying in a list
via the template reference {% include 
"persistent_messages/message/includes/messages.jquery.html" %}

The following javascript click trigger is bound to an anchor tag within the 
list:

$(closeSelector).click(function(event) {
        event.preventDefault();
        $.ajax({
                url: "//url.com/"+$(this).attr('href')
        })
        if ($(messageSelector).length <= 2) {
            $(closeAllSelector).messageClose();
        }

        $(this).closest(messageSelector).messageClose();
    });

The link being referenced is https://url.com/messages/mark_read/583/ 
If I access that same link manually in the address bar, the appropriate 
call in the backend
gets executed and the message is marked read. The ajax equivalent never 
seems to respond.
I added logging to the persistent messages view and confirmed the ajax call 
is never
calling mark_read() method.

Chrome dev tools indicates that the ajax call is "pending" and never 
changes from this state.

Any suggestions or ideas on what may be causing this?

NOTE: I prepend the "//url.com" to avoid getting 'insecure content' 
warnings, since this ajax code is being executed
from a https page. This change did not seem to affect the bug in any way, 
since the response is the same.

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to