SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    javascript auto submit

    Hi Guys can anyone help

    Does anyone know how to submit a form with dropdown selection data in it as the selection is made with no submit button.

    I am not a javascript programmer as such and can achieve the result easliy with ASP.NET. But cannot use in this case.

    For comleteness here is a selection of the code,

    <SELECT ID="SelectedAgent" NAME="SelectedAgent">
    <OPTION value="jta10/8767">jta10/8767</OPTION>
    <OPTION value="jta10/4591">jta10/4591</OPTION>
    <OPTION value="jta12/6565">jta12/6565</OPTION>
    </SELECT>

    So I want the form to submit as soon as a selection is made

    Any Ideas Thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi! Try this:

    <html>
    <body>
    <form name="myF" action="someSite.com">
    <SELECT ID="SelectedAgent" NAME="SelectedAgent" onchange="document.myF.submit();">
    <OPTION value="jta10/8767">jta10/8767</OPTION>
    <OPTION value="jta10/4591">jta10/4591</OPTION>
    <OPTION value="jta12/6565">jta12/6565</OPTION>
    </SELECT>
    </form>
    </body>
    </html>

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perfect thanks bosko


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
  •