How to enable submit button every time with jquery

What I learned while learning JavaScript at Tech Camp

After learning asynchronous communication using jQuery, press the submit button and after the event fires Here's how to enable the submit button to be disabled.

$('#hoge').prop('disabled', false);

What I found after investigating

--Disabled is set by default in Rails ver5.0 or later (to prevent repeated hits, etc.) ――There are other methods that can be effective

For example

$('#hoge').attr('disabled', false);

I tried it with my code and both worked

Next time, I will investigate methods such as prevention of repeated hits and make it usable

When asynchronous communication can be handled freely, many dynamic elements can be created in a small number of view files. I can take it in and the response seems to be quick, so even myself who has just learned programming I felt it was attractive.

Difficult but interesting

Recommended Posts

How to enable submit button every time with jquery
How to change the action with multiple submit buttons
How to number (number) with html.erb
How to update with activerecord-import
How to get values in real time with TextWatcher (Android)
How to move another class with a button action of another class.
How to avoid having to enter your username and password every time with git push-Ssh connection
How to get started with slim
How to enclose any character with "~"
How to use mssql-tools with alpine
How to get boolean value with jQuery in rails simple form
How to introduce jQuery in Rails 6
How to start Camunda with Docker
How to decorate the radio button of rails6 form_with (helper) with CSS
How to compare only the time with Rails (from what time to what time, something like)
How to crop an image with libGDX
How to adjustTextPosition with iOS Keyboard Extension
How to share files with Docker Toolbox
Output system time to MANIFEST.MF with Maven
How to compile Java with VsCode & Ant
[Java] How to compare with equals method
[Android] How to deal with dark themes
How to use BootStrap with Play Framework
How to use submit method (Java Silver)
How to switch thumbnail images with JavaScript
[Note] How to get started with Rspec
[Java] How to measure program execution time
How to do API-based control with cancancan
[Java] How to set the Date time to 00:00:00
How to achieve file download with Feign
How to update related models with accepts_nested_attributes_for
How to set JAVA_HOME with Maven appassembler-maven-plugin
How to implement TextInputLayout with validation function
How to handle sign-in errors with devise
How to delete data with foreign key
How to monitor nginx with docker-compose with datadog
How to deal with Precompiling assets failed.
How to achieve file upload with Feign
How to run Blazor (C #) with Docker
How to build Rails 6 environment with Docker
How to download Oracle JDK 8 rpm with curl
How to mock each case with Mockito 1x
How to use MyBatis2 (iBatis) with Spring Boot 1.4 (Spring 4)
How to save to multiple tables with one input
How to test interrupts during Thread.sleep with JUnit
[Android] How to detect volume change (= volume button press)
How to use built-in h2db with spring boot
How to create multiple pull-down menus with ActiveHash
How to use Java API with lambda expression
How to get started with Eclipse Micro Profile
How to give your image to someone with docker
How to insert all at once with MyBatis
[Rails] How to create a Twitter share button
How to use JQuery in js.erb of Rails6
How to build API with GraphQL and Rails
How to use nfs protocol version 2 with ubuntu 18.04
How to get resource files out with spring-boot
How to create member variables with JPA Model
How to verify variable items with WireMock's RequestBodyMatching
[Rails] How to build an environment with Docker
How to avoid exceptions with Java's equals method