jQuery UI Widgets Forums Dialogs and Notifications Tooltip, Notification, Popover issue when reusing the same div for different notifications

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 8 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • magostoni
    Participant

    Hello,
    I have this kind of issue.

    I’m using jqxNotification to notify errors or success; for the 2 different situations I’m using two different templates.

    this is the div for notification

    <div id="notify" style="margin-top: 100px !important; display:none;">
    	<div id="notify_content" style='font-size:15px; color:#ffffff'></div>
    </div>
    

    these are the 2 pipece of code I’m using

                    if (curr_code == '' || curr_code.length > 16) {
                        $("#notify_content").html('Il codice è obbligatorio e non deve superare i 16 caratteri');
                        $("#notify").jqxNotification({
                                    width: '50%', position: "top-left", opacity: 0.9,
                                    autoOpen: false, animationOpenDelay: 800, autoClose: true, autoCloseDelay: 3000, blink: false, template: "error"
                        });
                        $("#notify").jqxNotification("open");
    
                        commit(false);
                        return false;
                    }
    ....
    ....
    ....
    this is the ajax call
                        success: function (data, status, xhr)
                        {
                            var rowid = data[0].last_insertid;
                            commit(true,rowid);
                            $("#notify_content").html("Il record è stato aggiunto");
                            $("#notify").jqxNotification({
                                width: '70%', position: "top-left", opacity: 0.9,
                                autoOpen: false, animationOpenDelay: 800, autoClose: true, autoCloseDelay: 3000, blink: false, template: "success"
                            });
                            $("#notify").jqxNotification("open");
                        },
    

    the problem is that the template seems to be not updated; and so after I got a success, if I get the error situation, the notification is shown with the correct text but again with the template of the ‘success’ case.

    I’m probably missing something.


    Hristo
    Participant

    Hello magostoni,

    Please take a look this example: http://jsfiddle.net/txhi/5q8c944w/

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.