Monday, February 14, 2011

Alloy UI with Ajax

<portlet:actionURL var="ajaxURL" name="add" windowState="< %= LiferayWindowState.EXCLUSIVE.toString()%>" />


<form action="" name="fm" id="fm" method="post">
    <a href="#" onclick="submitForm();">confirm < /a>
</form>

<aui:script use="aui-io-request,aui-node" >
    Liferay.provide(
            window,
            'submitForm',
            function() {
               var A = AUI();
            A.io.request('<%= ajaxURL % >', {
              on: {
               success: function() {
                       A.one('#p_p_id<portlet:namespace/ >.portlet-content').html(this.get('responseData'));
               }
              }
            });
        });
</aui:script >
 Liferay Portal 5.2 Systems Development

1 comment :

Chirag Daslaniya said...

I try this code in liferay 6.1.x version ,but still page is refresh what to do ?