Friday, May 27, 2016

page1.jsp

<!--DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"--><%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><%@ taglib prefix="s" uri="/struts-tags"%> <s:if test="#session.voter==null"> <jsp:forward page="login.jsp" /> </s:if> <html><head><title>candidates by election</title><style type="text/css">* { margin:0; } html, body { font:14px normal Arial, Helvetica, sans-serif; color:#000; background:#eee; } a, a:active, a:visited { color:#36F; text-decoration:none; } a:hover { color:#30F; text-decoration:none; } table#canvas { border: 1px solid #CCC; box-shadow: 0 0 5px #CCC; margin-top:1px; } #container { min-height:500px; } ul#main-nav { list-style:none; margin:0; padding:0; } ul#main-nav li { list-style:none; float:right; padding:5px; } ul#main-nav li a { color:#09F; font-weight:bold; } ul#main-nav li a:hover { color:#fff; } #footer { font-size:11px; } ul#side-nav { list-style:none; margin:10px; padding:0; } ul#side-nav li { list-style:none; padding:5px 0; } #content { min-height:480px; padding:10px; } #cur-user { color:#fff; padding:5px 10px; font-size:12px; } th{ color:red; background:#ccc; } </style> <script> var xmlHttp; /** * @return {boolean} */ function loadOptions() { try { xmlHttp = new XMLHttpRequest(); } catch (e) { try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX..!"); return false; } } } xmlHttp.open("POST", "electionNameOptions", true); //xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8"); xmlHttp.send(null); xmlHttp.onreadystatechange = showMessage } function showMessage() { if (xmlHttp.readyState == 4) { // SetValues(xmlHttp.responseText); optionsData = xmlHttp.responseText; var arrData = optionsData.split(","); //optionElement =document.candidateForm.Element["candidateBean.electionID"]; optionElement = document.viewElectionCandidateForm.elements["electionName"]; for(v=0;v<arrData.length;v++){ // optionElement.options[optionElement.options.length] = new Option(arrData[v],arrData[v]); optionElement.options[v] = new Option(arrData[v],arrData[v]); } } } </script> <head> <body onload="loadOptions()"><center> <table id="canvas" border="0" cellspacing="0" cellpadding="0" width="960px"> <tr bgcolor="#FCF"> <td colspan="2" height="80px" align="center"> <img alt="EVS" src="header_final.jpg" /> </td> </tr> <tr bgcolor="#666"> <td valign="top"> <div id="cur-user">Welcome <em><s:property value="%{#session.name}" /></em></div> </td> <td valign="top" align="right"> <ul id="main-nav"> <li><a href="logoutVoter">Logout</a></li> <li><a href="voterHome.jsp">Home</a></li> </ul> </td> </tr> <tr bgcolor="#fff"> <td colspan="2" align="center"> <div id="container"> <br><br> <h2 style="color:blue"> Publish Election Board </h2><br><br> <s:if test="resultList.size() !=0"> <table border = 5 bordercolor="black" bgcolor="#FFFFC0"> <tr style="color: teal"><th>Election ID</th> <th>Candidate ID</th> <th>Vote Count</th> </tr> <s:iterator value="resultList"> <tr> <td><s:property value="electionID"/></td> <td><s:property value="candidateID"/></td> <td><s:property value="voteCount"/></td> </tr> </s:iterator> </table> <br><br><br><br> <input type="button" value="Print Results" onclick="window.print();"/> </s:if> <s:if test="resultList.size()==0"><br><br><br><br><h3><span style="color:brown"> Result not yet published!! </span></h3> </s:if> </div> </td> </tr> <tr height="25px" bgcolor="#999"> <td colspan="2" align="center"> <div id="footer">Copyright &copy; 2014 Wipro Technologies. All rights reserved.</div> </td> </tr> </table></center></body></html>

No comments:

Post a Comment

உப்பு மாங்காய்

சுருக்குப்பை கிழவி. சுருக்கங்கள் சூழ் கிழவி. பார்க்கும் போதெல்லாம் கூடையுடனே குடியிருப்பாள். கூடை நிறைய குட்டி குட்டி மாங்காய்கள். வெட்டிக்க...