Page 1 of 4
list empty returns javascript error
Posted: Tue Jun 11, 2013 8:48 am
by w
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?
list empty returns javascript error
Posted: Tue Jun 11, 2013 9:04 am
by Kateryna Grynko
Hello,
We'll take a look.
list empty returns javascript error
Posted: Tue Jun 11, 2013 9:06 am
by Kateryna Grynko
Hello,
We'll take a look.
list empty returns javascript error
Posted: Tue Jun 11, 2013 12:18 pm
by w
Any update on this, since this question is labeled as "answered" ?
list empty returns javascript error
Posted: Tue Jun 11, 2013 12:32 pm
by Kateryna Grynko
It's labeled automatically. Working on it.
list empty returns javascript error
Posted: Tue Jun 11, 2013 5:43 pm
by Maryna Brodina
Hello! Could you send us screenshot of code and error in you get?
list empty returns javascript error
Posted: Tue Jun 11, 2013 7:45 pm
by w
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:
list empty returns javascript error
Posted: Wed Jun 12, 2013 8:36 am
by w
Any updates on this? Can you reproduce the error?
list empty returns javascript error
Posted: Wed Jun 12, 2013 9:37 am
by Kateryna Grynko
Hi,
We are working on it right now. It's quite difficult to read the code.
list empty returns javascript error
Posted: Wed Jun 12, 2013 12:36 pm
by w
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.