1

This one is driving me crazy. I've tried several different solutions to no avail. Basically what is happening is that, when I submit a form, the request is being sent with no parameters. I've tried both POST and GET and have monitored the requests with Firebug. Here's some sample code:

<form action="/year/" id="year-form" method="get">
    <select class="dropdown" id="year" onchange="this.form.submit()">
        <option value="all">All</option>
        <option value="2011">2011</option>
        <option value="2010">2010</option>
        <option value="2009">2009</option>
    </select> 
</form>

Perhaps I should note that this is on a WordPress based site and I am directing the request back to the page from which it came. Any insight on this would be greatly appreciated.

3
  • 2
    You missed the name attribute for the <select>. Commented Jul 21, 2012 at 21:19
  • Sometimes, it's the simplest things that get you. Commented Jul 21, 2012 at 21:22
  • 1
    Your missing the name attribute for the select element Commented Jul 21, 2012 at 22:15

1 Answer 1

6

It's not submitted because it is missing a name attribute:

<select class="dropdown" id="year" onchange="this.form.submit()" name="year">

So it has nothing to do with Wordpress.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.