Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    display results based on list menu onchange

    i need a little help I have done this before and cannot get it going...

    I need a dynamic list menu and when an option selected it updated the recordset filter..

    EDIT*** this does work if i take the onchange out and ad a submit button.. its just the onchange or onclick that I am screwing up somehow..

    here is var
    Code:
    <&#37;
    Dim rs_faq__MMColParam
    rs_faq__MMColParam = "1"
    If (Request.Form("topic") <> "") Then 
      rs_faq__MMColParam = Request.Form("topic")
    End If
    %>
    here is the form

    Code:
    			  <form name="form1" method="post" action="" >
    			    <select name="topic" id="topic" onChange="reload" >
    			      <%
    While (NOT Recordset1.EOF)
    %>
    			      <option value="<%=(Recordset1.Fields.Item("uid").Value)%>"><%=(Recordset1.Fields.Item("topic").Value)%></option>
    			      <%
      Recordset1.MoveNext()
    Wend
    If (Recordset1.CursorType > 0) Then
      Recordset1.MoveFirst
    Else
      Recordset1.Requery
    End If
    %>
    		        </select>
                                                </form>
    Last edited by cwfontan; 01-16-2008 at 07:29 PM.

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    try:

    onChange="reload()"

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks.. here is what I used to let anyone searching this thread know
    Identify the form name
    this will reload the page an properly populate the request.form() etc..

    onchange="form1.submit()"
    Last edited by cwfontan; 01-17-2008 at 08:06 PM.


  •  

    Posting Permissions

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