I have create form as below -
I am using two table 1) Item_master and 2) IP_Address.
The field of IP_Address is given below
1) Item, IP_Address, EmpName
Here Item and IP_Address field is filled with fixed set of ip addresses and item. And if any ip address is assigned to anybody , then empname is filled, if ip address is released then empname field against that ip address is deleted.
If user select Computer in Item field, then the second field IP Address should be display the first available ip address from table automatically. How can I achieve this?
Thanks and regards,
Vikas
Code:
<table>
<tr>
<td align="right">VLAN Name : </td>
<td>
<select name="vlan_name" style="width:150px ">
<% set rs = conn.execute("select vlan_name from vlan_master order by vlan_name")
do while not rs.eof%>
<option value="<%=rs("vlan_name")%>"><%=rs("vlan_name")%></option>
<% rs.movenext
loop%>
</select>
</td>
</tr>
<tr>
<td align="right">Item : </td>
<td>
<select name="item" style="width:150px ">
<% set rs = conn.execute("select item, item_desc from network_item order by item_desc")
do while not rs.eof
if rs("item") = "PC" then%>
<option value="<%=rs("item")%>" selected><%=rs("item_desc")%></option>
<% else%>
<option value="<%=rs("item")%>"><%=rs("item_desc")%></option>
<% end if
rs.movenext
loop%>
</select>
</td>
</tr>
<tr>
<td align="right">IP Address : </td>
<td align="left"><input type="text" name="ip_address" style="width:150px "/></td>
</tr>
<tr>
<td align="right">MIS No : </td>
<td>
<select name="mis_no" style="width:250px ">
<% set rs = conn.execute("select a.mis_no, a.seq_no, a.lot_no, b.item_description from item_procurement_history_dtl a, item_master b where a.status = 'D' and b.item_code = a.item_code order by a.item_code, substr(mis_no, instr(mis_no, '/', -1)+1)")
do while not rs.eof%>
<option value="<%=rs("mis_no")%>"><%=rs("mis_no")%></option>
<% rs.movenext
loop%>
</select>
</td>
</tr>
<tr>
<td align="right">Employee name : </td>
<td align="left"><input type="text" name="emp_name" style="width:300px "/></td>
</tr>
</table>
The field of IP_Address is given below
1) Item, IP_Address, EmpName
Here Item and IP_Address field is filled with fixed set of ip addresses and item. And if any ip address is assigned to anybody , then empname is filled, if ip address is released then empname field against that ip address is deleted.
If user select Computer in Item field, then the second field IP Address should be display the first available ip address from table automatically. How can I achieve this?
Thanks and regards,
Vikas
Comment