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?
15 Antworten
+ 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)
+ 1
Visibility="visible"?
+ 1
You can use css properties in js also
and I can't help much without seeing the code 😅
+ 1
There are opacity and display also
+ 1
Sorry I don't understand all that I have just a basic knowledge of js till now , hopefully someone else can help you
+ 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]
+ 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
0
Visibility is for css...
But it's not working I tried that already
0
I can but I used that already
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.
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].
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
0
How will you verify it...The part if successful verification?
0
We have to move the values...
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