Request.Form is not working, please help

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Request.Form is not working, please help

    Hi guys,


    I'm creating a simple ASP page that first populates the combo box content from
    a table. Then the index.asp is where the user chooses from what organization
    page they want to view, after clicking go I want to put a queryString after the
    home.asp address so that I can figure out which organization page to display.

    However, it seems I have something wrong on how to manipulate the
    request.form. Please help me, please check my code. Thanks

    Casper


    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>W E L C O M E ! ! !</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    body,td,th {
    color: #ccffff;
    }
    body {
    background-image: url(Images/pattern3.gif);
    }
    a:link {
    color: #ccffff;
    }
    a:visited {
    color: #ccffff;
    }
    a:hover {
    color: #FFFF99;
    }
    .style1 {
    font-size: large;
    font-weight: bold;
    }
    -->
    </style></head>
    <%
    ' Declare variables
    Dim RS
    Dim RS_numRows

    ' Create a recordset
    Set RS = Server.CreateObject("ADODB.Recordset")
    ' Define the database path
    RS.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    Server.MapPath("/thesis/myDatabase.mdb")
    ' Define the Sql String
    RS.Source = "SELECT organizationAbb FROM organizationTB Order by
    organizationAbb"
    ' Define the access type
    RS.CursorType = 0
    RS.CursorLocation = 2
    RS.LockType = 1
    ' Open the databse connection
    RS.Open()
    ' Initialize a variable
    RS_numRows = 0
    %>

    <body>
    <Form name="form1" method="post" action="">
    <table width="760" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td align="right" class="date"><SCRIPT
    language="javascript">ShowDateTime(showDateTime)</SCRIPT></td>
    </tr>
    <tr>
    <td><TABLE border=0 cellPadding=0 cellSpacing=0 height=85
    width="760">
    <TR>
    <TD width=152><img src="From%20NEU%20Website/hdr_r1_c1.jpg"
    width="152" height="85"></TD>
    <TD width=152><img src="From%20NEU%20Website/hdr_r1_c4.jpg"
    width="152" height="85"></TD>
    <TD width=152><img src="From%20NEU%20Website/hdr_r1_c5.jpg"
    width="152" height="85"></TD>
    <TD width=152><img src="From%20NEU%20Website/hdr_r1_c6.jpg"
    width="152" height="85"></TD>
    <TD width=152><img src="From%20NEU%20Website/hdr_r1_c7.jpg"
    width="152" height="85"></TD>
    </TR>
    </TABLE>
    <div align="center">
    <img src="Images/SCHOOL.jpg" width="760" height="400">
    <strong></strong></div>
    <strong><table width="761" border="0">
    <tr>
    <td width="494" height="26" bgcolor="#336600"><div align="center"
    class="style1">Select Organization
    Alias to start browsing their webpage </div></td>
    <td width="127" bgcolor="#336600" align="center"><select name="cmbOrgAbb"
    size="1" id="cmbOrgAbb">
    <%
    ' populate the list of departments in the combo box. Here, do while statement
    is use to iterate through all the records
    While (NOT RS.EOF)
    %>
    <!-- Assign the value for each combo list -->
    <option
    value="<%=(RS.Fields.Item("organizationAbb").Value )%>"><%=(RS.Fields.Item("organ
    izationAbb").Value)%></option>
    <%
    RS.MoveNext()
    Wend
    If (RS.CursorType > 0) Then
    RS.MoveFirst
    Else
    RS.Requery
    End If

    RS.Close
    Set RS = Nothing
    %>
    </select>
    </td>
    <td width="128" bgcolor="#336600" align="center"><strong><a
    href="index.asp?orgAbb=<%=Request.Form("cmbOrgAbb" )%>">Go</a></strong></td>
    </tr>
    </table>
    </strong>
    </form>
    </body>
    </html>


    Amcasperforu Guest

  2. Similar Questions and Discussions

    1. Request object not working
      Hi, I have a weird problem. I have a user control, included in a page. This UC does authentication and tracking. I developed the code in...
    2. Confused about a REQUEST.FORM and a REQUEST.QUERYSTRING
      This is snipit of code, supplied by PayPal with explanation about what has to be done to access their back end. I am confused because they first...
    3. Request objects working fine locally on IIS, but not on my live site
      I'm cannot seem to get my request objects posted from a form on a previous page to show up on the page I'm posting to. When I try it locally on my...
    4. Cannot use Request.Form
      Hi! I get an error when I run my code Is there any other way to get te information from my form? Heres the error I get and the code beneath....
    5. best way to get data: request.form, request.params, controlname.value
      Hi! I think I remember somewhere that using request.form was a bad idea (I can't say I remember why). So I'm wondering: What is the best way to...
  3. #2

    Default Re: Request.Form is not working, please help

    <strong><table width="761" border="0">

    A <strong> tag around a table?

    Anyhow, is there some other page that is submitting its data via a form's
    post to this page? Request.Form() parses that data from the post header,
    not from the current page.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "Amcasperforu" <webforumsuser@macromedia.com> wrote in message
    news:dqmjsd$7k1$1@forums.macromedia.com...
    > Hi guys,
    >
    >
    > I'm creating a simple ASP page that first populates the combo box content
    > from
    > a table. Then the index.asp is where the user chooses from what
    > organization
    > page they want to view, after clicking go I want to put a queryString
    > after the
    > home.asp address so that I can figure out which organization page to
    > display.
    >
    > However, it seems I have something wrong on how to manipulate the
    > request.form. Please help me, please check my code. Thanks
    >
    > Casper
    >

    Murray *TMM* Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139