Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
MortyWaves
25 days ago
|
parent
|
context
|
favorite
| on:
Brut: A New Web Framework for Ruby
Is there a reason you literally simulate a click event on the form instead of calling submit() on it?
Mystery-Machine
25 days ago
|
next
[–]
`requestSubmit()`*
https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormEle...
rorylaitila
25 days ago
|
prev
[–]
Yeah, it's escaping me at the moment all of the reasons, but calling .submit() on a form element doesn't exactly have all of the behaviors as calling .click() on a button element in a form, particularly multiple buttons in a form.
hapidjus
25 days ago
|
parent
[–]
Are you perhaps using the button name/value for something? Havent tested but i suspect that submit() does not pass that right?
rorylaitila
25 days ago
|
root
|
parent
[–]
Yep that's one reason. I make heavy use of that.
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: