Languages

Menu
Sites
Language
Error in tau.min.js (25) :Uncaught TypeError: Cannot read property 'classList' of undefined

I've created a TAU basic UI application. Whenever I :

1- Press back key from my page (of class="ui-page ui-page-active")

2- From the  page (of class="ui-page ui-page-active"), go to that page again.

 

I get the following error:

 

Error in tau.min.js (25) :Uncaught TypeError: Cannot read property 'classList' of undefined

 

Although there many errors in the tau.min.js file and the file is not formatted properly. I still managed to get that:

this._ui.indicatorIcon.classList is somehow undefined which causes it to through an uncaught error.

 

Please guide me what I'm doing wrong hee. Can I get an error free version of tau.min.js ?

Responses

1 Replies
Pistle Potter

It means that document.getElementById("lastName") is returning undefined and you're trying to call classList on undefined itself.

In your HTML input has the attribute name which equals lastName but there is no actual id="lastname"

Either add the attribute id to your input or change getElementById to getElementsByName.

Note that getElementsByName doesn't return a single item.