<portlet:resourceURL var="SubmitURL" />
<input type="text" name="txt1" id="txt1" />
<input type="button" onclick="helpful();" value="Submit" />
function helpful()
{
var textvalue=document.getElementById('txt1').value;
$.ajax ({
url:'<%=SubmitURL%>',
type: 'POST',
data : ({
textVal: textvalue
}),
success: function()
{ alert('success');
}
});
}
final String textValue= resourceRequest.getParameter("textVal");
<input type="text" name="txt1" id="txt1" />
<input type="button" onclick="helpful();" value="Submit" />
function helpful()
{
var textvalue=document.getElementById('txt1').value;
$.ajax ({
url:'<%=SubmitURL%>',
type: 'POST',
data : ({
textVal: textvalue
}),
success: function()
{ alert('success');
}
});
}
final String textValue= resourceRequest.getParameter("textVal");
No comments:
Post a Comment