Ask coding questions

← Back to all posts
Problem with login button
syflexer (480)

i get this error msg when i press my login button

login.php:56 Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
at login (login.php:56)
at HTMLButtonElement.onclick (login.php:10)

but i have no idea how to fix it

Coder100 (18199)

did you mean

form.innerText += "fulln";

you can only append elements. You can edit HTML.

Anyways, a better solution is to use textnodes

SixBeeps (5221)

The appendChild() function expects a DOMNode as a parameter, but you're giving it a string. Are you trying to make the elements for the login form?