w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

list empty returns javascript error

I have a list $('[name="lijst"]') which is working perfectly. If I do $('[name="lijst"]').prop('outerHTML') I get the correct html with the ul tags included.

Now when I do $('[name="lijst"]').empty(), I get this javascript error from appery.js:

TypeError: context is undefined
[Break On This Error]

elem = context.find("[dsid='" + name + "'], " +

appery.js (line 396)

Do you have more information about this?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

list empty returns javascript error

Hello,

We'll take a look.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

list empty returns javascript error

Hello,

We'll take a look.

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

list empty returns javascript error

Any update on this, since this question is labeled as "answered" ?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

list empty returns javascript error

It's labeled automatically. Working on it.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

list empty returns javascript error

Hello! Could you send us screenshot of code and error in you get?

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

list empty returns javascript error

Image

It is only the 1st page show javascript that is important: There is just one call to bouwContactenLijstPagina(); which is this:

precode
function bouwContactenLijstPagina(){
if (localStorage.getItem("zkChanged") == "1") {

Code: Select all

   $('[name="lstContacten"]').empty();  //--> geeft fout 

   toonSpinner(); 
   JSDO_get_contacts.execute({});  
   $('input[data-type="search"]').val(""); 
   $('input[data-type="search"]').trigger("change"); 

   localStorage.setItem("zkChanged", "0"); 
 } 

 if (localStorage.getItem("zkStartPos") == "1") { 
   Appery('btnVorige').addClass('ui-disabled'); 
   Appery('lblHuidig').text('pag. 1 / ...'); 
 } 
 else { 
   Appery('btnVorige').attr("disabled", null ); 
   Appery('btnVorige').removeClass('ui-disabled'); 

   var huidigePagina =  ( 
                             (  
                                     parseInt( 
                                                 localStorage.getItem("zkStartPos") 
                                             )  
                                     -1 
                             )  
                             / parseInt( 
                                         localStorage.getItem("maxAantalContacten") 
                                         )  
                         )  
                         +1; 
   Appery('lblHuidig').text('pag. ' + huidigePagina + ' / ...'); 
 } 

}
/code/pre

Mind that without the code$('[name="lstContacten"]').empty();/code everything works normally.

This is the error:

Image

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

list empty returns javascript error

Any updates on this? Can you reproduce the error?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

list empty returns javascript error

Hi,

We are working on it right now. It's quite difficult to read the code.

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

list empty returns javascript error

I have the same problem with a certain selectmenu.

I have 2 similar selectmenus on a page, one selectmenu I can do .empty() but the other one I get exactly the same error as in the post above.

Return to “Issues”