Forums de discussion
issue jquery ajax is not working in liferay 6.1
Kiran Kumar Boyini, modifié il y a 11 années.
issue jquery ajax is not working in liferay 6.1
Expert Publications: 287 Date d'inscription: 02/06/11 Publications récentes
Hi All,
I am trying to use the ajax call .But is not working.
See the code below
I am trying to use the ajax call .But is not working.
See the code below
<aui:form name="mailPopupForm" action="<%=mailajaxURL.toString() %>">
.....................
form elements
......................
</aui:form>
<script type="text/javascript">
function sendMail(){
if(mailPopupFormValidate()){
alert(document.getElementById('<portlet:namespace />popupFlagHidden').value);
var fromMailId=document.getElementById('<portlet:namespace />fromMailId').value;
var toMailId=document.getElementById('<portlet:namespace />toMailId').value;
var subject=document.getElementById('<portlet:namespace />subject').value;
var mailBody=document.getElementById('<portlet:namespace />mailBody').value;
var popup=document.getElementById('<portlet:namespace />popupFlagHidden').value;
//document.mailPopupForm.submit;
jQuery.ajax({
type: 'POST',
url:'<%=mailajaxURL.toString()%>',
data:{
fromMailId:fromMailId,
toMailId:toMailId,
subject:subject,
mailBody:mailBody,
popup:popup
},
dataType:'html',
success:function(message) {
alert('This is inside the successfuntion');
}
});
}
}
</script>
Help me...
Regards,
Kiran.
Hitoshi Ozawa, modifié il y a 11 années.
RE: issue jquery ajax is not working in liferay 6.1
Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
You've already asked this question once in this forum before. Please don't ask it again.
http://www.liferay.com/community/forums/-/message_boards/message/21066821
http://www.liferay.com/community/forums/-/message_boards/message/21066821