javascript - Uncaught TypeError: Cannot read property 'next_page' of undefined -



javascript - Uncaught TypeError: Cannot read property 'next_page' of undefined -

i'm working on site client , bit of code has worked in past, no longer working. no 1 has touched core code , i'm not sure resolution.

we utilize docebo (an lms) , in test require pupil select reply before can click "next question". if haven't selected answer, button grayed out , unclickable. believe framework using yui library this.

i don't "uncaught typeerror: cannot read property 'next_page' of undefined " error until select answer. 1 time error happens, button doesn't become functional.

chrome's console points bit of code...

function controltotquestion() { var info = yahoo.util.dom.get('answer_info'); if(tot_question == 0) { settimeout(function() { if(yahoo.buttonobjects.next_page) yahoo.buttonobjects.next_page.set('disabled', false); if(yahoo.buttonobjects.show_result) yahoo.buttonobjects.show_result.set('disabled', false); if(info) info.style.display = 'none'; }, 0); } else { settimeout(function() { if(yahoo.buttonobjects.next_page) yahoo.buttonobjects.next_page.set('disabled', true); if(yahoo.buttonobjects.show_result) yahoo.buttonobjects.show_result.set('disabled', true); if(info) info.style.display = 'block'; }, 0); } }

any help much appreciated!

thanks!

it's trying read property next_page of yahoo.buttonobjects. hence yahoo.buttonobjects undefined. in other words, whatever yahoo is, no longer has element called buttonobjects. yahoo external library? if so, check whether they've removed buttonobjects functionality.

javascript php jquery

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -