<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ROS</title>
<script type="text/javascript">
function writeResult(){
alert('hi');
for (i=0;i<document.chestpain.onset.length;i++){
if(document.getElementById('ans').checked=true){
var onset=document.getElementById('ans').value;
alert("hi");
document.getElementById('textresultdescription').innerHTML = onset+text+ans+extra;
}
}
//var x = document.getElementById('textresultdescription').value;
//alert(document.write(x));
// document.getElementById('textresultdescription').innerHTML = onset+text+ans+extra+'\n';
}
</script>
</head>
<body>
<h2>ChestPain</h2>
<form name="chestpain" method="post" action="insert_chestpain.php">
<div style="font-family: TimesNewRoman; font-size:18px;">
<div style="padding: 10px;">
When did the pain start?<br/>
<input type="radio" name="onset" value="Less than 1day" id="onset" checked onclick="writeResult(' Started ','Less than 1day',' back');"/>Less than 1 day
<input type="radio" name="onset" value="2 to 4 days" id="onset"onclick="writeResult(' Started ','2 to 4 days',' back');"/>2 to 4 days
<input type="radio" name="onset" value="4 to 7 days" id="onset"onclick="writeResult(' Started ','4 to 7 days',' back');"/>4 to 7 days<br/>
<input type="radio" name="onset" value="1 to 2 weeks" id="onset"onclick="writeResult(' Started ','1 to 2 weeks',' back');"/>1 to 2 weeks
<input type="radio" name="onset" value="more than 2 weeks" id="onset" onclick="writeResult(' Started ','more than 2 weeks',' back');" />more than 2 weeks<br/>
</div>
<div style="padding: 10px;">
Does the pain spread to any other area? If yes, specify the area?<br/>
<input type="checkbox" name="radiation[]" value="No" onclick="writeResult('','NO','it doesnot spread to anyarea');" />No
<input type="checkbox" name="radiation[]" value="Neck/Jaw" onclick="writeResult('Spreads to my ','Neck/Jaw',' area');"/>Neck/Jaw
<input type="checkbox" name="radiation[]" value="Left Arm/Shoulder" onclick="writeResult('Spreads to my ','Left Arm/Shoulder',' area');"/><b>Left Arm/Shoulder</b>
<input type="checkbox" name="radiation[]" value="Right Shoulder" onclick="writeResult('Spreads to my ','Right Shoulder',' area');"/>Right Shoulder
<input type="checkbox" name="radiation[]" value="Upper Back" onclick="writeResult('Spreads to my ','Upper Backl',' area');"/>Upper Back
<input type="checkbox" name="radiation[]" value="Back to front of chest" onclick="writeResult('Spreads to my ','Back to front of chest',' area');"/>Back to front of chest
</div>
<div style="padding: 10px;">
how does the pain feel?<br/>
<input type="radio" name="quality" value="Squeezing" onclick="writeResult('Pain is ','Squeezing',' in character');"/>Squeezing
<input type="radio" name="quality" value="Choking" onclick="writeResult('Pain is ','Choking','');"/>Choking
<input type="radio" name="quality" value="Burning" onclick="writeResult('Pain is ','Burning','');"/>Burning
<input type="radio" name="quality" value="Stabbing" onclick="writeResult('Pain is ','Stabbing','');"/>Stabbing
<input type="radio" name="quality" value="Tearing" onclick="writeResult('Pain is ','Tearing','');"/>Tearing
<input type="radio" name="quality" value="Sharp pricking" onclick="writeResult('Pain is ','Sharp pricking',' ');"/>Sharp pricking
<input type="radio" name="quality" value="Tingling (like shock)" onclick="writeResult('Pain is ','Tingling (like shock)','');"/>Tingling (like shock)
<input type="radio" name="quality" value="Heavy Pressure" onclick="writeResult('Pain is ','Heavy Pressure','');"/>Heavy Pressure
</div>
<input type="submit" name="submit" value="submit" />
</div>
<textarea name="getvalues" id="textresultdescription" rows="4" cols="100"></textarea>
</form>
</body>
</html>