1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
<script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
function showUnvote(id) {
$("#unvotemsg" + id).show();
$("#votemsg" + id).hide();
}
function showVote(id) {
$("#votemsg" + id).show();
$("#unvotemsg" + id).hide();
}
</script>
<table>
<tr>
<th>Course</th>
<th>
Total Votes
</th>
<th></th>
</tr>
<tr>
<td>
Operating System
</td>
<td id = votes180 >
0
</td>
<td>
<div class="votebox">
<script type="text/javascript">$(showVote(180));</script>
<div id = "unvotemsg180" style="display: none;">
You have voted !
<a href="/Vote/UndoVoteForCourse/180" onclick="Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'votes180', onSuccess: Function.createDelegate(this, showVote(180)) });">Undo vote</a>
</div>
<div id = "votemsg180" style="display: none;">
<a href="/Vote/VoteForCourse/180" onclick="Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'votes180', onSuccess: Function.createDelegate(this, showUnvote(180)) });">Vote for this course</a>
</div>
</div>
</td>
</tr>
<tr>
<td>
Software Engineering
</td>
<td id = votes181 >
0
</td>
<td>
<div class="votebox">
<script type="text/javascript">$(showVote(181));</script>
<div id = "unvotemsg181" style="display: none;">
You have voted !
<a href="/Vote/UndoVoteForCourse/181" onclick="Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'votes181', onSuccess: Function.createDelegate(this, showVote(180)) });">Undo vote</a>
</div>
<div id = "votemsg181" style="display: none;">
<a href="/Vote/VoteForCourse/181" onclick="Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'votes181', onSuccess: Function.createDelegate(this, showUnvote(180)) });">Vote for this course</a>
</div>
</div>
</td>
</tr>
</table> |
Partager