View Full Version : mutiple submit buttons
twocool
05-05-2003, 04:15 AM
i have a code whcih has mutiple submit buttons..... but i want to pass the values to each individual submit button.... how should i do it...
i tried one.... cdoing... but it submits all the al values... not the individual row whcih has the submit button...
pls help.... see yr advice
whammy
05-05-2003, 04:37 AM
You should probably use multiple forms on the page, which are NOT nested, in this case. i.e.:
<form id="form1">
<input type="whatever" />
</form>
<form id="form2">
<input type="whatever" />
</form>
<form id="form3">
<input type="whatever" />
</form>
twocool
05-05-2003, 08:54 AM
i use loop for the form ....... so how to gone on doing it....
form name="form2" method="post" action="approve_action.asp">
<table width="100%" border="0" cellspacing=0 align="center">
<%Do While Not rs.EOF%>
<tr style="background-color:#EEEEEE;" class="header3">
<td width="15%" height="22">Request No</td>
<td width="25%" height="22">Requestor Name</td>
<td width="15%" height="22">Application System</td>
<td width="20%" height="22">Request Title</td>
<td width="10%" height="22">Request Date</td>
<td width="10%" height="22">Desired Date</td>
<td width="15%" height="22">Action</td>
</tr>
<tr style="background-color:#FFFFCC;" onmouseover="this.style.backgroundColor='#ffcc99';" onmouseout="this.style.backgroundColor='#FFFFCC';" class="text">
<td width="15%"><a href="approve_display.asp?ReqNo=<%=rs("ReqNo")%>" target="_blank", width=500,height=400><%=rs("ReqNo")%></a></td>
<input type="hidden" name="ReqNo" value="<%=rs("ReqNo")%>">
<td width="25%"><span class="txtblack12"><%=rs("Reqtr")%></span></td>
<td width="15%"><span class="txtblack12"><%=rs("AppnId")%></span></td>
<td width="20%"><span class="txtblack12"><%=rs("ReqTitle")%></span></td>
<td width="10%"><span class="txtblack12"><%=Day(rs("ReqDt") )%>/<%=Month(rs("ReqDt") )%>/<%=Year(rs("ReqDt") )%> <%'=rs("ReqDt")%></span></td>
<td width="10%"><span class="txtblack12"><%=Day(rs("DesiredDt") )%>/<%=Month(rs("DesiredDt") )%>/<%=Year(rs("DesiredDt") )%> <%'=rs("DesiredDt")%></span></td>
<td width="15%">
<select name="ReqStatus<%=counter%>">
<%
sql="Select ReqStatus from ReqStatusRef where SeqNo='2' or SeqNo='98'"
set rs1 = MSCS.Execute(sql)
if not rs1.eof then
do
%>
<option value="<%=rs1("ReqStatus")%>"><%=rs1("ReqStatus")%></option>
<%
rs1.movenext
loop until rs1.eof
end if
%>
</select>
</td>
</tr>
<tr>
<td width="15%">Reasons For Rejection:</td>
<td width="25%">
<textarea rows="3" cols="45" name="RejRemarks<%=counter%>" onKeyUp="max_count();" class="txtblack12"></textarea>
</td>
<td width="13%">
<input type="submit" onclick="javascript:submit_form('<%=rs("ReqNo")%>', '<%=currentEle%>' )" name=Submit value="Submit">
<!--input type="submit" onclick="javascript:submit_form('<%=ReqNo%>','<%=ReqStatus%>','<%=RejRemarks%>','update')" name=Submit value="Submit" ID="Submit1"-->
<!--input type="submit" name="Submit" value="Submit"-->
<%rs.MoveNext
counter = counter + 1
%>
<%loop%>
</td>
</tr>
</table></form>
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.