How to make input field without submit button | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to make input field without submit button

I want to have an input field but without the submit button so that the user inputs one character and the word is being passed on to php algorithm ... I don't know how to do without a submit but and for my project the submit button doesn't fit very well would it somehow work with javascript??

19th Aug 2017, 1:19 PM
Victor Cislari
Victor Cislari - avatar
5 Answers
+ 3
Yep, AJAX. Using XHR, jQuery or even Fetch. Are you trying to do dynamic lookup with suggestions, like: [How m_ ] How much tea in China... How many logs can a woodchuck... How marshmallows puff... If not, please excuse my self-amusement.
19th Aug 2017, 3:04 PM
Kirk Schafer
Kirk Schafer - avatar
0
You can have input tag without form and submit tags. Just use Javascript to get input value whenever you need it to.
19th Aug 2017, 2:12 PM
Calviղ
Calviղ - avatar
0
ok but how can i convert javascript to php cause I am gonna be working with databases I mean how to get variable values to php
19th Aug 2017, 2:34 PM
Victor Cislari
Victor Cislari - avatar
0
You can use Ajax to post the data to PHP.
19th Aug 2017, 2:48 PM
Calviղ
Calviղ - avatar
0
yeah it is supposed to be a vocabulary search "machine" you enter one word in German and the other in English... then when you want to search in German it should show you possibilities in English for example : (german)ich ha... |||| (english)i have / i had ...
19th Aug 2017, 3:27 PM
Victor Cislari
Victor Cislari - avatar