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 scroll horizontally with ScrollView
How to deploy jQuery on Rails
How to get started with slim
How to use mssql-tools with alpine
How to get boolean value with jQuery in rails simple form
How to convert param to hash with Rails controller (updated from time to time)
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
[Rails] How to use rails console with docker
How to use submit method (Java Silver)
How to switch thumbnail images with JavaScript
[Note] How to get started with Rspec
How to do API-based control with cancancan
[Java] How to set the Date time to 00:00:00
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 test private scope with JUnit
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
[Java] How to test for null with JUnit
How to mock each case with Mockito 1x
How to mock each case with PowerMock + Mockito1x
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 search multiple columns with gem ransack
How to use Java framework with AWS Lambda! ??
[Swift] How to link the app with Firebase
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 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 monitor SPA site transitions with WKWebView
How to write test code with Basic authentication
How to build API with GraphQL and Rails
How to use nfs protocol version 2 with ubuntu 18.04
How to use docker compose with NVIDIA Jetson