Show the hidden button [UNSOLVED] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Show the hidden button [UNSOLVED]

I have a button in my form that is hidden. I am using jQuery.(#idname).onclick(func.({ ... to make it appear on click. But it's not working. Does anyone have any ption available?

2nd May 2020, 6:28 PM
Vishal Srivastava
Vishal Srivastava - avatar
15 Answers
+ 2
I can now visualise how it is but isn't that easy to enable submit button? Like if successful verification{ $("#id").prop("disabled",false) } Only if it was disabled at first like $("#id").prop("disabled",true)
2nd May 2020, 7:57 PM
Abhay
Abhay - avatar
+ 1
Visibility="visible"?
2nd May 2020, 6:41 PM
Abhay
Abhay - avatar
+ 1
You can use css properties in js also and I can't help much without seeing the code 😅
2nd May 2020, 6:44 PM
Abhay
Abhay - avatar
+ 1
There are opacity and display also
2nd May 2020, 6:46 PM
Abhay
Abhay - avatar
+ 1
Sorry I don't understand all that I have just a basic knowledge of js till now , hopefully someone else can help you
2nd May 2020, 7:03 PM
Abhay
Abhay - avatar
+ 1
After clicking verify otp getting confirmation code from php side and matching it to the if condition value I dunno anything about how you get things done with php or communicate with backened but there must be some code that should be generated if verify otp is successful ,I have zero knowledge in this , If this doesn't helps you I recommend you to add this to your question title like this Show the hidden button[UNSOLVED]
2nd May 2020, 8:18 PM
Abhay
Abhay - avatar
+ 1
Yes I can do that by creating a cookie and saving otp until it expires and calling value to js through ajax Thanks for help man
2nd May 2020, 8:27 PM
Vishal Srivastava
Vishal Srivastava - avatar
0
Visibility is for css... But it's not working I tried that already
2nd May 2020, 6:43 PM
Vishal Srivastava
Vishal Srivastava - avatar
0
I can but I used that already
2nd May 2020, 6:45 PM
Vishal Srivastava
Vishal Srivastava - avatar
0
Actually I have to use this property inside a loop of ajax ... When ajax reuquest will process success that's why I have to do it in that way. It's on submit change event which will only change onsubmit. And because of the css property it's not holding it . The delay timer is in millisec to hold it. By the way this submit will send only a particular field of form to html without reload and on successful blast I want change...not on the fake blast. That's why.
2nd May 2020, 6:49 PM
Vishal Srivastava
Vishal Srivastava - avatar
0
Thanks for your response Maybe I haven't explained you fully. Here I go I'm creating a form. It's a difficult one. So in my form there are text fields like name,address,mobile number,etc. So if a user wants to submit a form then he has to verify his mobile number. For this I want that when user input it's mobile number an otp would sent to his number in background. I don't want a particular page for otp verification. That's why there is a submit button in the last of the form which is disabled. Now when user input his number and click on button getotp next to mobile number field...it will send otp using php in background and at the same time a box will show up up to enter otp and a button will show up with value "verify otp". The problem which I faced are so many and I have overcome those problems step by step. Problem which I faced was- 1. I want to send only number field to that php page. [Solved]. 2. I want my button to show up at a right time. [Unsolved].
2nd May 2020, 7:14 PM
Vishal Srivastava
Vishal Srivastava - avatar
0
I will also face the problem if I will set the fields name email to required... because at that time if user wants to verify it's otp first then want to fill other details at that time they will cause the problem. Now after successful verification I want my submit button to enable then to submit my request to database. If you have any idea any solution to any of these problem Abhay , that would help me lot. Thanks bro
2nd May 2020, 7:17 PM
Vishal Srivastava
Vishal Srivastava - avatar
0
How will you verify it...The part if successful verification?
2nd May 2020, 8:09 PM
Vishal Srivastava
Vishal Srivastava - avatar
0
We have to move the values...
2nd May 2020, 8:10 PM
Vishal Srivastava
Vishal Srivastava - avatar
0
I think there is issue in syntax. It should be as: $("#idname"). on ("click", function (){ $("#hidden_button").show(); }) Because onclick is js event and cant be used in jquery
3rd May 2020, 8:31 PM
Tanishq Joshi
Tanishq Joshi - avatar