|
Subject:
|
jump menu value
|
|
Posted By:
|
Adam H-W
|
Post Date:
|
11/10/2004 1:32:30 PM
|
Hi there
I've got 2 forms on a page. When the user selects (from a drop down jump menu) a value, I want that value carried to the second form; how can I do that? I've tried numerous ways and it says:
either bof or eof has been reached or record has been deleted??
Here is my relevant code:
<form action="add.asp" method="post" name="frm"> <td width="80%"> <select name="Cats" class="TextBox_X" onChange="javascript:document.frm.submit();" id="Cats"> <% if Request("Header") = empty then %> <option value="" selected>-- Select Category --</option> <% end if
do while not rsVehicle.EOF
if CStr(request("CategoryID")) = Cstr(rsVehicle("Header")) then %> <option value="<%=rsVehicle("CategoryID")%>" selected><%=rsVehicle("Header")%></option> <% else %> <option value="<%=rsVehicle("CategoryID")%>"><%=rsVehicle("Header")%></option> <% end if
rsVehicle.movenext loop
%> </select> </td> </form> </tr> </table> <p> <% if Request("Cats") <> Empty then %> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td><form action="add.asp?Req=Y" method="post" enctype="multipart/form-data" name="_frm_add_ad"> <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#4F775D"> <tr bgcolor="#FFFFFF"> <td><p><strong>Selected Category:</strong></p></td> <td> <% strCat = request(rsVehicle("CategoryID")) 'response.Write(strCat) 'response.End()%> <input type="hidden" value="<%=strCat%>" name="strCat">
thanks
Adam
|
|
Reply By:
|
happygv
|
Reply Date:
|
11/14/2004 11:54:53 PM
|
1) What is that you are checking for EMPTY there? Is it a constant?quote: if Request("Header") = empty then
2)quote: do while not rsVehicle.EOF
Do you check if the Recordset has reached EOF before the while loop was started?
_________________________ - Vijay G Strive for Perfection
|