Why is a null displayed in the first row?:-/
I want the first row to display the text value given in the textfield(actually i am getting the text value from database)
Any help??
<html>
<head>
</head>
<body>
<form name="form1">
<input type="text" name="txtname">
<input type="submit" value="Click here" name="Click" onclick="fun(this.form)"/>
</form>
<script>
function fun(form1)
{
var a='Hello';
document.write('<center><table width="75%" border="1">');
document.write('<tr align="center"><td>' + <% out.println(request.getParameter("txtname")); %> + '<\/td><td>' +a + '<\/td><\/tr>');
document.write('<tr align="center"><td>' + a + '<\/td><td>' +a + '<\/td><\/tr>');
document.write('<\/table><\/center>');
}
</script>
</body>
</html>
****************
OUTPUT
Null Hello
Hello Hello