hi there i am working on an inventory rpoject and for that i have made a stock entry form which is pasted below,I have included this form in the main Add Stock page, having the following inputs to be saved
1.code no
2part no
3total replace no's--------->this is wot the ques is about
4auto
5type
6brand
7height
8product
9outer dia 1
10 outer dia2
11inner dia1
12 inner dia 2
13unit price
NOw the client has the business of AUTO FILTERS ,means WATER SEP FILTER,OIL SEPERATOR FILTER ETC. Ror each filter they have different qualities for which they have a "Replacemen t No". This means if he has a Mobile of Nokia6230 he has this mobile in 3 Manufacturers and 2 pieces/Manufacturers, i.e uk made, china made, hungary made e.t.c he will assign 1 "Code No" and 3 different "Replace no" to these 3 different makes while entering the stock,now the prob is that the total number of "Replace Nos" are not fixed there can be 1 "Replace No" for 1 part and on the other hand 5 "Rep Nos " for another part ,what i am doing/trying to do is that i am using a div with a selection menu in which i want to give a serial of nos from 1 to onwards and i am using the "onchange" in the "Select" tag which is calling a javascript function which enables the other divs for eg if i have selected "3" in the "Total Replace Nos" option then it shud call the javascript function which shud enable 3 input boxes to enter the 3 replace nos for the part :( isnt it lengthy ...if there is a better way todo this thing do temme and thanks for any help in advance the code for the form is given here :
[code=html]
<%
dim DateStatus
DateStatus=now( )
%>
<tr>
<td>
<table cellspacing="0" cellpadding="0" width="690" align="center" valign="top" bordercolor="#4 C4A48" height="170">
<tr><td class="add"><di v align="left">Co de No:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="code_no" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">Pa rt No:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_name " type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">To tal Replace No's:</div></td>
<td class="150" align="center" valign="middle" >
<div align="left">
<SELECT name="t_rep" onChange="" style=" width:194px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#8C8B89; color:#8C8B89; background-color:#0A0501 ">
<OPTION value="none" selected="selec ted">Please Select Any Number</OPTION>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
</td>
<td class="add"><di v align="left">Au to:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_add" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">Re place No:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_add" type="text" size="25" style=" width:194px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#8C8B89; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">Ou ter Dia1:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="toc_fr" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">Ty pe:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_add" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">Ou ter Dia2:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="toc_fr" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">Br and:</div></td>
<td ="#346598" width="150" align="Center" valign="Center" ><div align="left"><i nput name="caller" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">In ner Dia1:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="toc_to" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">He ight:</div></td>
<td ="#346598" width="150" align="Center" valign="Center" ><div align="left"><i nput name="caller" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">In ner Dia2:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="toc_to" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">Pr oduct:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_add" type="text" size="25" style=" width:194px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#8C8B89; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">Un it Price:</div></td>
<td width="150" align="Center"> <div align="left"><i nput name="tel_no" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
</table>
</td>
</tr>[/code]
1.code no
2part no
3total replace no's--------->this is wot the ques is about
4auto
5type
6brand
7height
8product
9outer dia 1
10 outer dia2
11inner dia1
12 inner dia 2
13unit price
NOw the client has the business of AUTO FILTERS ,means WATER SEP FILTER,OIL SEPERATOR FILTER ETC. Ror each filter they have different qualities for which they have a "Replacemen t No". This means if he has a Mobile of Nokia6230 he has this mobile in 3 Manufacturers and 2 pieces/Manufacturers, i.e uk made, china made, hungary made e.t.c he will assign 1 "Code No" and 3 different "Replace no" to these 3 different makes while entering the stock,now the prob is that the total number of "Replace Nos" are not fixed there can be 1 "Replace No" for 1 part and on the other hand 5 "Rep Nos " for another part ,what i am doing/trying to do is that i am using a div with a selection menu in which i want to give a serial of nos from 1 to onwards and i am using the "onchange" in the "Select" tag which is calling a javascript function which enables the other divs for eg if i have selected "3" in the "Total Replace Nos" option then it shud call the javascript function which shud enable 3 input boxes to enter the 3 replace nos for the part :( isnt it lengthy ...if there is a better way todo this thing do temme and thanks for any help in advance the code for the form is given here :
[code=html]
<%
dim DateStatus
DateStatus=now( )
%>
<tr>
<td>
<table cellspacing="0" cellpadding="0" width="690" align="center" valign="top" bordercolor="#4 C4A48" height="170">
<tr><td class="add"><di v align="left">Co de No:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="code_no" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">Pa rt No:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_name " type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">To tal Replace No's:</div></td>
<td class="150" align="center" valign="middle" >
<div align="left">
<SELECT name="t_rep" onChange="" style=" width:194px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#8C8B89; color:#8C8B89; background-color:#0A0501 ">
<OPTION value="none" selected="selec ted">Please Select Any Number</OPTION>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
</td>
<td class="add"><di v align="left">Au to:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_add" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">Re place No:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_add" type="text" size="25" style=" width:194px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#8C8B89; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">Ou ter Dia1:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="toc_fr" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">Ty pe:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_add" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">Ou ter Dia2:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="toc_fr" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">Br and:</div></td>
<td ="#346598" width="150" align="Center" valign="Center" ><div align="left"><i nput name="caller" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">In ner Dia1:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="toc_to" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">He ight:</div></td>
<td ="#346598" width="150" align="Center" valign="Center" ><div align="left"><i nput name="caller" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">In ner Dia2:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="toc_to" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
<tr>
<td class="add"><di v align="left">Pr oduct:</div></td>
<td width="150" align="Center" valign="Center" ><div align="left"><i nput name="cust_add" type="text" size="25" style=" width:194px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#8C8B89; color:#8C8B89; background-color:#0A0501 "></div></td>
<td class="add"><di v align="left">Un it Price:</div></td>
<td width="150" align="Center"> <div align="left"><i nput name="tel_no" type="text" size="25" style="width:19 4px; height:17px; font-size:11px; font-family:tahoma; border-style:solid; border-width:1px; border-color:#4C4A48; color:#8C8B89; background-color:#0A0501 "></div></td>
</tr>
</table>
</td>
</tr>[/code]
Comment