1

I'm looking for a good example that shows how to handle (in the controller) a POST onchange (of a input["text"] for example)

Currently when I set my onchange = form[0].submit(); and I watch the action hit the controller, the HTTP verb is still GET for some odd reason. But when I view source the form on the page has the method="POST" ... so what am I doing wrong?

Toran Billups
  • 27,715
  • 39
  • 150
  • 262

2 Answers2

1

Are you able to make use of an ajax library (jquery, ms, whatever) and set up a post for the call instead?

"The javascript submit() method does not fire the onsubmit event, but bypasses it and directly submits the form. " - http://www.webmasterworld.com/forum91/4047.htm

nkirkes
  • 2,605
  • 2
  • 20
  • 35
1

you should put

return false

at the end of submit event handler function

Marko
  • 1,816
  • 21
  • 36