SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Need to compare database value to form value

    Is there a simple way to compare a current value in a form element to a database value?

    I want to populate a popup based on what the user selected in the current, non-posted form. Here's what I want to do:

    <table width="95%" border="1" align="center" bgcolor="#EEEEEE">
    <tr>
    <td class="RequiredField">Select a Shipper:</td>
    <td colspan="3"><select name="Shippers<%=(x)%>" id="Shippers<%=(x)%>" onChange="Shippers_Change(<%=(x)%>)">

    <%
    While (NOT Shippers.EOF)
    If ( Shippers.Fields.Item("ContentOwnerID").Value = document.EntryForm.ContentOwnerID.value ) Then
    %>
    <option value="<%=(Shippers.Fields.Item("ShipperId").Value)%>"><%=(Shippers.Fields.Item("ShipperNumber").Value)%></option>
    <%
    End If
    Shippers.MoveNext()
    Wend
    If (Shippers.CursorType > 0) Then
    Shippers.MoveFirst
    Else
    Shippers.Requery
    End If
    %>
    </select>&nbsp;


    The comaprison I want to do is in bold...

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,107
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    No, there is a clear distinction between server side and client side.

    ContentOwnerID needs to be sent to the server so that you can render the options appropriately.


Bookmarks

Posting Permissions

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