The answer is yes this should help you look at the 5th example down https://www.w3schools.com/jsref/met_document_addeventlistener.asp
also you challenge looks good I like the way you did your validation
you might want to move your attribute out of your main design on wide screens it is going flex to the row of your content
@AngelusLovell
Posted
@palgramming Thank you, for your reference. It solved one of the most annoying problems I was facing.
Also, your appreciation means a lot to me, so thank you again.
By removing my attribute out of my main design, do you mean I should be removing my wrapper-responsive class from the main div or something else?
One last question how can I do achieve something like this - inputObj[3].addEventListener("focus", validateObj());
function validateObj() {
if(inputObj[1] is keyup)
do something;
}
@ShashaGazem for the attribution problem you need to take the FLEX off your body tag
@AngelusLovell
Posted
@palgramming OK, i understand now thank you.
@ShashaGazem inputObj3.addEventListener("focus", () => { validateObj() })
this might help you need to put a function in the EventListener here I used a Arrow formatted function and then call your function inside that function
https://flaviocopes.com/javascript-arrow-functions/
@AngelusLovell
Posted
@palgramming OK.