jQWidgets Forums

jQuery UI Widgets Forums Editors Button, RepeatButton, ToggleButton, LinkButton Please help – Functions not working on page loaded via AJAX

This topic contains 3 replies, has 2 voices, and was last updated by  C.S.Putera 11 years, 10 months ago.

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

  • C.S.Putera
    Participant

    Hello. I’ve tried jqwidgets for a few days and got amazed by it. But I got some difficulties.

    I am using jqwidgets with Yii Framework. I use jqxtree with jqxtabs, so everytime user click menu on the left, it will open a new tab, which content is loaded via AJAX. e.g I click on User menu, it will show list of user, using jqxgrid ( page list.php ) and on list.php I have a button, which if clicked will load user’s form.php via AJAX and located at the top of the grid. The form has been loaded successfully, but the jqx functions on form.php does not loaded. Here is the code :

    var theme = "metro";
    $(document).ready(function() {
    $("#user-submit-btn").jqxButton({ theme: theme, width: "80px"});
    });

    But I got error on firebug saying :

    Uncaught TypeError: Object [object Object] has no method ‘jqxButton’
    (anonymous function)
    fire
    self.fireWith
    jQuery.extend.ready

    Is there something I’m missing ? Please help, thank you


    C.S.Putera
    Participant

    I found the reason. There is conflict between jquery used by jqwidgets with jquery used by Yii form ( which is generated by Yii automatically to handle validation-related functions ). Is there a way to handle this conflict ? Thank you


    Peter Stoev
    Keymaster

    Hi C.S.Putera,

    jQWidgets depends on jQuery. However, you should not have references to the jQuery library more than 1 for a page. With jQWidgets you should use at least jQuery 1.7.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    C.S.Putera
    Participant

    Problem solved, thank you so much Peter

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

You must be logged in to reply to this topic.