+ 3

What should I write in the html function to make the button value 'a' to appear in textbox?

19th Mar 2017, 9:11 PM
Kirollos Ayman
12 Answers
+ 3
l have textbox with name 'shafra' <input type="text" name="shafra"/> and button <button></button> I want when I click on this button write value 'a' in this textbox thanks for your answer
19th Mar 2017, 9:46 PM
Kirollos Ayman
+ 2
thanks very much for your answer
19th Mar 2017, 10:32 PM
Kirollos Ayman
+ 2
you don't understand me I want when I click on button letter a appear in textbox like the keyboard
19th Mar 2017, 10:50 PM
Kirollos Ayman
+ 2
I want to make button when l click on it value 'a' appear in textbox
20th Mar 2017, 1:11 PM
Kirollos Ayman
+ 2
thanks very much for your answer you are helpful man
20th Mar 2017, 1:14 PM
Kirollos Ayman
+ 2
no problem thanks for you
20th Mar 2017, 1:48 PM
Kirollos Ayman
0
can you explain exactly what you mean. as in input + button = textbox "input" ? and what do u mean by textbox
19th Mar 2017, 9:15 PM
Cole Reizenberg
Cole Reizenberg - avatar
0
you can only do it in JS as far as I know. because you can submit the text, but after that only do something with it in JS.
19th Mar 2017, 9:55 PM
Cole Reizenberg
Cole Reizenberg - avatar
0
I was wrong. I did it in HTML referencing JS using script tag, so only half wrong. <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <div align="center"> <form action="javascript:userInput()" name="a" method="post"> <label>User Input Here</label> <br /> <br /> <input type="text" name="b" value=''> <br /> <br /> <input type="submit" value="Submit"></input> </form> </div> <script> function userInput(){ alert(document.a.b.value); //Replace with your textbox code or whatever } </script> </body> </html> You can find it in my codes under helpingOut
19th Mar 2017, 10:23 PM
Cole Reizenberg
Cole Reizenberg - avatar
0
sorry still don't get it man
20th Mar 2017, 6:56 AM
Cole Reizenberg
Cole Reizenberg - avatar
0
then use input button submit alert (a)
20th Mar 2017, 1:13 PM
Cole Reizenberg
Cole Reizenberg - avatar
0
sorry about the earlier mistakes, glad to help
20th Mar 2017, 1:16 PM
Cole Reizenberg
Cole Reizenberg - avatar