Created
June 3, 2015 21:26
-
-
Save dlfinis/2dc0f7a6e49620a43e31 to your computer and use it in GitHub Desktop.
Change event of select menu by ajax laod the article content in a part of the page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$( "#listImages" ) | |
.selectmenu(); | |
$(""#listImages").on('selectmenuchange',function() { | |
var articleId=$(this).val(); | |
var groupId= <%=themeDisplay.getScopeGroupId() %>; | |
var url= '<liferay-portlet:renderURL windowState="exclusive" portletName="56_INSTANCE_cam"> '+ | |
'<liferay-portlet:param name="groupId" value="ScopeGroupID" />'+ | |
' <portlet:param name="articleId" value="ArticleID" />'+ | |
' </liferay-portlet:renderURL>'; | |
url=url.replace("ScopeGroupID",groupId); | |
url=url.replace("ArticleID",articleId); | |
$.ajax({ | |
url:url, | |
success:function(response){ | |
$("#content").html(response); | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment