- This topic has 8 replies, 3 voices, and was last updated 11 years, 7 months ago by support-octavio.
-
AuthorPosts
-
donijMemberHi Octavio,
using mobione ul list has been very challenging to me. I still have not been able to solve the problem of the scroll panel height not changing.
Now my latest issue is that when I try to append an item to a ul list I end up with double entries into the list.
I have two list items… one called store and the other cart.
When I click item in store it gets added to cart.
I am sending the complete project to you via mail. Kindly help me out to see where the issue is. It is too simple to be frustrating.
Thanks
donijMemberWhile I wait for response from support, I just want to show code of what am dealing with if someone could spot the error in my code.
Again I have two list controls…. one is store and the other cart. When I click an item in the storeList control I want it to be added in the cartList control.
This is the code that runs when the document is ready just to fill the storeList with one item……
phoneui.documentReadyHandler = function() {
$(“#m1-testcenter2-cartList”).children().remove();//clear cartList
var storeList = $(“#m1-testcenter2-storeList”);
storeList.children().remove();//clear storeList
var html = ‘<li id = “me” class=”shop”> One List Item </li>’;
storeList.append(html);
phoneui.preprocessDOM(“#m1-testcenter2”);
}This is the jquery document code. The storeList item has a class shop, so the $(“.shop’).click event gets called when clicked as below………
$(document).ready(function() {
$(“.shop”).click(function() {
var cartList = $(“#m1-testcenter2-cartList”);
var html = ‘<li class=”incart”>Cart Item</li>’;
cartList.append(html);
phoneui.preprocessDOM(“#m1-testcenter2”);
return false;
});$(“.incart”).live(“click”, function () {
$(this).remove();
phoneui.preprocessDOM(“#m1-testcenter2”);
return false;
});});
Using the debugger to step through I discovered the click event calls the $(“.shop”).click event twice. I guess there is something am doing wrong. Please help.
Thanks
donijMemberHi,
anyone to help with this. Thank you…
donijMemberI moved the files to internet host site and the click runs just fine…..only one entry per click. Am thinking there is something wrong with the test center…. or probably my installation. Hope some can try this in their test center.
Thanks.
donijMemberOk… I have changed my <a> tag to <input type=”button”> and I now get a single click. Though what I needed is the <a> tag. Just like I mentioned earlier it is the click event that runs twice and causes the list append function to run twice too and made it look as if it is a double entry on the list. Wayne-Octavio pls do the magic……help resolve the double click event for a single button click or <a> tag click. Clicking a list item does the double click too.
Thanks guys.
support-octavioMemberSeems that you found out what is the problem: the double actions calls. Let’s continue that discussion in the already opened thread where you and Yann have provided us useful info 🙂
donijMemberOk .. Thanks.
renato.guigliaParticipantHi, I have the same problem with duplicate events, do you have some workaround about it?
Where is the main discussion about it?
Thank you.
support-octavioMemberHi renato,
The issue is being worked on now. Please see Wayne’s responses about same error reports here:
http://www.genuitec.com/support-genuitec/viewtopic.php?p=16749#p16749
http://www.genuitec.com/support-genuitec/viewtopic.php?p=15168#p15168 -
AuthorPosts