Skip to content

Instantly share code, notes, and snippets.

@davidberard98
Last active August 29, 2015 14:18
Show Gist options
  • Save davidberard98/f06a52476379a8187776 to your computer and use it in GitHub Desktop.
Save davidberard98/f06a52476379a8187776 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC>
<html>
<head>
<style>
body
{
background-color:#4400AA;
color:white;
}
div.contain
{
position:relative;
top:10px;
left:200px;
width:700px;
padding:0;
}
div.tablecont
{
border: 1px solid white;
}
div.indentabit
{
position:relative;
top:10px;
left:200px;
}
</style>
<script type="text/javascript">
function return_ans(in)
{
var ans = [];
ans["A"] = 1;
return ans[in];
}
function checkans(a)
{
var idClass = a.id.substr(0, a.id.length-3);
if(return_ans(idClass) == a.value)
alert("correct!");
else
alert("no");
}
</script>
</head>
<body>
<div class = "contain">
<h1>Psychoanalysis: Defense Mechanisms</h1>
<div class="tablecont">
<table style="width:650px;1px solid white;"> <tr>
<th style="width:400px"> Prompt </th>
<th style="width:50px"> Answer </th>
<th style="width:200px"> Feedback </th>
</tr><tr>
<td id="A_ta"> blocking out and avoiding thoughts related to the subject </td>
<td id="A_tb"> <input type="text" style="width:40px;" id="A_in" onBlur="checkans(this)" /> </td>
<td id="A_tc"> <input type="text" style="width:190px;" id="A_out" onFocus="blur()" /> </td>
</tr></table>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment