Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Your session has expired please log in again.
Your session has expired please log in again.
Your session has expired please log in again.
Your session has expired please log in again.
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

flexbox, media queries, transition, animate, javascript etc

@AngelusLovell

Desktop design screenshot for the Intro component with sign-up form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Is it possible to call a js function with an argument inside the addEventListener function?

Community feedback

P
Patrick 14,265

@palgramming

Posted

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

0

@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;
 }
0
P
Patrick 14,265

@palgramming

Posted

@ShashaGazem for the attribution problem you need to take the FLEX off your body tag

0

@AngelusLovell

Posted

@palgramming OK, i understand now thank you.

0
P
Patrick 14,265

@palgramming

Posted

@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/

0

@AngelusLovell

Posted

@palgramming OK.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord