Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 10th, 2004, 02:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default jump menu value

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>&nbsp;
            <%

            strCat = request(rsVehicle("CategoryID"))

            'response.Write(strCat)

            'response.End()%>

            <input type="hidden" value="<%=strCat%>" name="strCat">


thanks

Adam


 
Old November 15th, 2004, 12:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

1) What is that you are checking for EMPTY there? Is it a constant?
Quote:
quote:if Request("Header") = empty then
2)
Quote:
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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help with Jump to URL lina_d_d Crystal Reports 0 October 26th, 2006 04:59 AM
How do I create a jump menu in XSLT? kwilliams XSLT 4 January 9th, 2006 10:34 AM
hide jump menu? lian_a Classic ASP Basics 8 December 10th, 2004 08:33 AM
why it jump? kentown C++ Programming 3 December 6th, 2004 10:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.