
Hi,
I created a button when i click on button new textbox is created. and i want to do that when i enter the text input in text box and when i will click submit button the text should be submitted(it shows the value in text box in SOP). i also want the text box should generate in front of NEW button and after it submits it should show before the NEW line.
Please help me out.....
this is the code.
<html>
<head>
<script>
function generatenew()
{
var d=document.getElementById("div");
d.innerHTML+="<p><input type='text' name='food'>";
}
</script>
</head>
<body>
<form name='abc' method="post" action="">
<div id="div"></div>
<b><font color="red">
<font size="4">NEW</font></font></b>
<input type="button" value="new" onclick="generatenew()">
</form>
</body>
</html>

Hi Friend,
<html>
<head>
<script>
function generatenew(){
document.abc.food.style.visibility="visible";
}
</script>
</head>
<%
String data=request.getParameter("food");
if(data!=null){
System.out.println(data);
%>
<input type="text" value="<%=data%>">
<%
}
%>
<body>
<form name='abc' method="post" action="">
<div id="div"></div>
<b><font color="red">
<font size="4">NEW</font></font></b>
<input type="button" value="new" onclick="generatenew();">
<input type="text" style="visibility:hidden" name="food">
<input type="submit" value="submit">
</form>
</body>
</html>
Thanks

Thank u so much..
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.