I am trying to code a quicklist for my site I am have a little trouble I can add a element in a array but when removing it is not working I have posted the code below any help guys
Code:<script type="text/javascript"> var propList; var curPos; var curSize; var propList = []; function addProperty(propNum) { if (curSize == 0) { propList[0] = propNum; }else { propList.push(propNum); curSize = propList.length; document.getElementById('snum').value = propList.length; document.getElementById("snum").style.display = ""; document.getElementById("snum1").style.display = ""; sessvars.saveList = propList; }} function removeProperty(propNum) { propList = sessvars.saveList; alert('deleting: ' + propNum); curPos = 0; while (curPos <= propList.length) { // alert('entered loop'); if (propList[curPos] == propNum) { propList[curPos] = null; alert('found propertid ' + propNum + ' at position ' + curPos); } curPos=curPos+1; } sessvars.saveList = propList; listProperty(); } </script>


Reply With Quote
Bookmarks