Hi everybody,
I have a web page containing of table with columns like product name, id, price etc. I want to edit the contents of a row, instead of entering in a text box and updating. It will be better if that grid is scrollable and dynamically editable.
Thanks guyz...
But you can also create table rows dynamically
Assuming you have your products in an Iterator called iterator
[HTML]
<FORM name ="form1" method = "post" action = "<%=path">
<TABLE border="0">
<TBODY>
<TR>
<TH >ID</TH>
<TH >Name</TH>
</TR>
<%
while(iterator.hasNext()) {
pr = (Product)iterator.next();
%>
<TR>
<TD > <INPUT type="text" name="id<%=pr.getID() %>" size="20" value="<%=pr.getID() %>" readonly></TD>
<TD > <INPUT type="text" name="name<%=pr.getID() %>" size = "20" value="<%=pr.getName() %>"> </TD>
<TD > <INPUT type="text" name="price<%=pr.getID() %>" size = "20" value=".<%=pr.getPrice() %>"></TD>
</TR>
<%
}
%>
</TBODY>
</TABLE>
</FORM>
[/HTML] Restricts id to be uneditable. The id gives each input box its uniqueness