i have a form which is to be submitted.but what i want to check is whether the user is inside session or not???if the user is inside session then the values must be submitted .if not it must show a message saying ('Please login using facebook').so how can i check whether the user is in session or not???
Script code:
<script type="text/javascript">
function submitform(){
alert("In Submit form");
var frm=document.getElementById("myForm");
frm.action="Electionservlet?formidentity=editYPName";
alert("before submit");
frm.submit();
}
</script>
html code:
<table style="width: 100%; border: 0px; border-spacing: 0px; padding: 0px; text-align: center;">
<tr>
<td align="center">
<a style="color: #000;" href="javascript:submitform();">Submit</a>
</td>
</tr>
</table>