Hi
Please find the solutions for this using jquery
1. download min.js file from jquery website add reference to your project.
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<script src="Scripts/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$(".abc").live("click", function () {
var selectedQuestion = "";
var $this = $(this);
if ($this.is('input')) {
selectedQuestion += $this.val();
var id = $this.closest('td').next().find('input').attr("id");
$('#' + id).val(selectedQuestion);
}
});
});
</script>
<title></title>
</head>
<body>
<table>
<tbody>
<tr>
<td>
<input type="text" name="q3" id="q3" class="abc" value="What is your nick name?" style="font-size:9px" height="10" />
</td>
<td>
<input id="question1" name="question1" type="text"/>
</td>
</tr>
<tr>
<td>
<input type="text" name="q6" id="q6" class="abc" value="How old are you?" style="font-size:9px;" height="10" />
</td>
<td>
<input id="question2" name="question2" type="text" />
</td>
</tr>
<tr>
<td><input type="text" name="q4" id="q4" value="What is your birth date?" class="abc" style="font-size:9px" height="10" /></td>
<td><input id="question3" name="question3" type="text" /></td>
</tr>
</tbody>
</table>
<div></div>
</body>
</html>
thanks
sandeep miriyala
vanisandeep@gmail.com
Let me know any query you have mail me above.