Username Password

Register Here || Lost Password
View Thread
Explore Your Brain » Pemrograman » Out Of Topic Programing
code error zynga poker...??
Username
Password
Register FAQ Members List Today's Posts Search

Print Thread

16-01-2010 05:14 AM code error zynga poker...??
User Avatar

rizalufikri
Murid Akademi II


Posts: 24
Joined: 08.11.09
pas lagi masuk aplikasinya zynga ga sengaja muncul pesen error :

function LadderGifts() { var _categories = []; var _categories_ui_created = false; var _selected_cat = null; var _current_chips = 7600; var _sn = 1; var _uid = 0; var _rec_21 = true; var _buy_button_disabled = false; this.getChipCount = function() { return _current_chips; } this.setCurrGiftSN = function(sn) { _sn = sn; } this.getCurrGiftSN = function() { return _sn; } this.setCurrGiftUid = function(uid) { _uid = uid; } this.getCurrGiftUid = function() { return _uid; } this.setRecipient21 = function(bool) { _rec_21 = bool; } this.isRecipient21 = function() { return _rec_21; } this.getCategory = function(index) { return _categories[index]; } this.setCategories = function() { _categories = []; if (!(!this.is21() && 4 == 1)) { var cat = new Category(); cat.setName("Entertainment"Wink; cat.setStringName("entertainment"Wink; cat.setId(4); var g = new Gift(); g.setName("Tissues"Wink; g.setPrice("10"Wink; g.setId("111"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift111_1.png"Wink; g.setCategoryId(4); cat.addGift(g); var g = new Gift(); g.setName("Sun Flower"Wink; g.setPrice("30"Wink; g.setId("155"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift155_1.png"Wink; g.setCategoryId(4); cat.addGift(g); var g = new Gift(); g.setName("Elvis Doll"Wink; g.setPrice("200"Wink; g.setId("62"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/entertainment_elvis.png"Wink; g.setCategoryId(4); cat.addGift(g); var g = new Gift(); g.setName("Angel"Wink; g.setPrice("600"Wink; g.setId("162"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift162_1.png"Wink; g.setCategoryId(4); cat.addGift(g); var g = new Gift(); g.setName("Devil"Wink; g.setPrice("700"Wink; g.setId("161"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift161_1.png"Wink; g.setCategoryId(4); cat.addGift(g); var g = new Gift(); g.setName("GoGoDancer"Wink; g.setPrice("1000"Wink; g.setId("67"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/entertainment_GoGoDancer.png"Wink; g.setCategoryId(4); cat.addGift(g); var g = new Gift(); g.setName("Rose"Wink; g.setPrice("2000"Wink; g.setId("68"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift68_1.png"Wink; g.setCategoryId(4); cat.addGift(g); var g = new Gift(); g.setName("Cupid"Wink; g.setPrice("3000"Wink; g.setId("156"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift156_1.png"Wink; g.setCategoryId(4); cat.addGift(g); var g = new Gift(); g.setName("Smooch"Wink; g.setPrice("5000"Wink; g.setId("76"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift76_6.png"Wink; g.setCategoryId(4); cat.addGift(g); var g = new Gift(); g.setName("Diamond Ring"Wink; g.setPrice("10000"Wink; g.setId("80"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift_10.png"Wink; g.setCategoryId(4); cat.addGift(g); _categories[4] = cat; } if (!(!this.is21() && 1 == 1)) { var cat = new Category(); cat.setName("Drinks"Wink; cat.setStringName("drinks"Wink; cat.setId(1); var g = new Gift(); g.setName("Beer"Wink; g.setPrice("5"Wink; g.setId("1"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/drinks_beer.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Coffee"Wink; g.setPrice("6"Wink; g.setId("87"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift87_1.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Energy Drink"Wink; g.setPrice("10"Wink; g.setId("148"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift148_3.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Tequila"Wink; g.setPrice("20"Wink; g.setId("5"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/drinks_tequila.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Fruit Smoothie"Wink; g.setPrice("20"Wink; g.setId("120"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift120_1.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Bacon Vodka"Wink; g.setPrice("25"Wink; g.setId("147"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift147_2.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Margarita"Wink; g.setPrice("30"Wink; g.setId("2"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift2_1.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Pina Colada"Wink; g.setPrice("40"Wink; g.setId("39"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/drinks_colada.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Cosmopolitan"Wink; g.setPrice("50"Wink; g.setId("8"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/drinks_cosmo.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Mojito"Wink; g.setPrice("60"Wink; g.setId("4"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/drinks_mojito.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Poison"Wink; g.setPrice("80"Wink; g.setId("150"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift150_2.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Chateau Z"Wink; g.setPrice("100"Wink; g.setId("11"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/drinks_wine.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Cognac"Wink; g.setPrice("200"Wink; g.setId("9"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/drinks_cognac.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Love Potion"Wink; g.setPrice("300"Wink; g.setId("149"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift149_2.png"Wink; g.setCategoryId(1); cat.addGift(g); var g = new Gift(); g.setName("Champagne"Wink; g.setPrice("1000"Wink; g.setId("12"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/drinks_bubbly.png"Wink; g.setCategoryId(1); cat.addGift(g); _categories[1] = cat; } if (!(!this.is21() && 2 == 1)) { var cat = new Category(); cat.setName("Snacks"Wink; cat.setStringName("snacks"Wink; cat.setId(2); var g = new Gift(); g.setName("Nuts"Wink; g.setPrice("5"Wink; g.setId("20"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/food_nuts.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Chips"Wink; g.setPrice("5"Wink; g.setId("105"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift105_1.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Donuts"Wink; g.setPrice("10"Wink; g.setId("96"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift96_1.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Beef Jerky"Wink; g.setPrice("15"Wink; g.setId("151"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift151_1.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Taco"Wink; g.setPrice("25"Wink; g.setId("114"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift114_1.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Zmite"Wink; g.setPrice("25"Wink; g.setId("159"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift159_1.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Chocca Mocca"Wink; g.setPrice("30"Wink; g.setId("23"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/food_chocamocha.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Cheesecake"Wink; g.setPrice("30"Wink; g.setId("81"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift81_1.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Cherry Pie"Wink; g.setPrice("30"Wink; g.setId("72"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/food_pie.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Mile High Cake"Wink; g.setPrice("45"Wink; g.setId("100"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift100_1.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Sushi"Wink; g.setPrice("50"Wink; g.setId("24"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/food_sushi.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Pizza"Wink; g.setPrice("80"Wink; g.setId("152"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift152_1.png"Wink; g.setCategoryId(2); cat.addGift(g); var g = new Gift(); g.setName("Filet Mignon"Wink; g.setPrice("100"Wink; g.setId("25"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/food_filet_mignon.png"Wink; g.setCategoryId(2); cat.addGift(g); _categories[2] = cat; } if (!(!this.is21() && 3 == 1)) { var cat = new Category(); cat.setName("Smokes"Wink; cat.setStringName("smokes"Wink; cat.setId(3); var g = new Gift(); g.setName("Smokes"Wink; g.setPrice("5"Wink; g.setId("40"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/smokes_cigs.png"Wink; g.setCategoryId(3); cat.addGift(g); var g = new Gift(); g.setName("Cigarette"Wink; g.setPrice("10"Wink; g.setId("42"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/smokes_cig_holder.png"Wink; g.setCategoryId(3); cat.addGift(g); var g = new Gift(); g.setName("Nicotine Gum"Wink; g.setPrice("20"Wink; g.setId("97"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift97_1.png"Wink; g.setCategoryId(3); cat.addGift(g); var g = new Gift(); g.setName("Stogie"Wink; g.setPrice("25"Wink; g.setId("41"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/smokes_stogie.png"Wink; g.setCategoryId(3); cat.addGift(g); var g = new Gift(); g.setName("Herbal Rolls"Wink; g.setPrice("75"Wink; g.setId("43"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/smokes_herbal.png"Wink; g.setCategoryId(3); cat.addGift(g); var g = new Gift(); g.setName("Hookah"Wink; g.setPrice("100"Wink; g.setId("153"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift153_1.png"Wink; g.setCategoryId(3); cat.addGift(g); var g = new Gift(); g.setName("Maui Wowie"Wink; g.setPrice("500"Wink; g.setId("45"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/img/giftshop/60/smokes_spliff.png"Wink; g.setCategoryId(3); cat.addGift(g); var g = new Gift(); g.setName("Pipe"Wink; g.setPrice("1000"Wink; g.setId("154"Wink; g.setImage("http://statics.poker.static.zynga.com/poker/dynamic_assets/60/gift154_1.png"Wink; g.setCategoryId(3); cat.addGift(g); _categories[3] = cat; } } this.getSelectedCategory = function() { return _selected_cat; } this.selectDefaultCategory = function() { var default_cat = (this.is21()) ? 1 : 2; _selected_cat = _categories[default_cat]; return this.getSelectedCategory(); } this.createCategories = function() { if (_categories_ui_created) return; if (_categories.length == 0) { this.setCategories(); } var container = document.getElementById('gift_category_ul'Wink; var ul_container = document.getElementById('gift_category_detail_cont'Wink; if (container && ul_container) { for (var i = 0; i < _categories.length; i++) { if (_categories[i] == undefined) continue; var li = _categories[i].createListItem(); var ul = _categories[i].createGiftContainer(); container.appendChild(li); ul_container.appendChild(ul); } } this.createSendOptions(); _categories_ui_created = true; } this.getPointsTotalId = function() { return "currPointsTotal"; } this.getGiftNameId = function() { return "gift1"; } this.getGiftRecId = function() { return "currRecipient"; } this.getPriceId = function() { return "price1"; } this.createSendOptions = function() { var cont = document.getElementById('gift_send_html'Wink; if (cont != undefined) { // POINTS var send_profile_left = document.createElement('div'Wink; send_profile_left.addClassName('sendToProfile_left'Wink; var send_profile_left_p = document.createElement('p'Wink; var send_profile_left_p_text = document.createElement('div'Wink; send_profile_left_p_text.setTextValue("You have"Wink; var points_total = document.createElement('span'Wink; points_total.addClassName('special'Wink; points_total.setId(this.getPointsTotalId()); points_total.setTextValue("$" + addCommas(_current_chips)); send_profile_left_p.appendChild(send_profile_left_p_text); send_profile_left_p.appendChild(points_total); send_profile_left.appendChild(send_profile_left_p); // GIFT SIDE var send_profile_right = document.createElement('div'Wink; send_profile_right.addClassName('sendToProfile_right'Wink; send_profile_right.addClassName('clearfix'Wink; // PROFILE PIC var send_profile_pict = document.createElement('div'Wink; send_profile_pict.addClassName('sendToProfile_pict'Wink; send_profile_pict.setId('currProfileImg'Wink; send_profile_right.appendChild(send_profile_pict); // GIFT AND RECIPIENT INFO var send_profile_info = document.createElement('div'Wink; send_profile_info.addClassName('sendToProfile_info'Wink; var send_profile_info_p = document.createElement('p'Wink; // SEND INFO // Not the best way, but it works Smile var send_span = document.createElement('span'Wink; send_span.setTextValue("Send "Wink; // GIFT NAME var gift_name = document.createElement('span'Wink; gift_name.setId(this.getGiftNameId()); var to_span = document.createElement('span'Wink; to_span.setTextValue(" to "Wink; // GIFT RECIPIENT var gift_rec = document.createElement('span'Wink; gift_rec.setId(this.getGiftRecId()); var q_span = document.createElement('span'Wink; q_span.setTextValue("?"Wink; send_profile_info_p.appendChild(send_span); send_profile_info_p.appendChild(gift_name); send_profile_info_p.appendChild(to_span); send_profile_info_p.appendChild(gift_rec); send_profile_info_p.appendChild(q_span); send_profile_info.appendChild(send_profile_info_p); // BUY BUTTON var buy_button = document.createElement('a'Wink; buy_button.setHref("#"Wink; buy_button.addEventListener("click",this.handleBuyClicked.bind(this),false); // PRICE var buy_button_span = document.createElement('span'Wink; buy_button_span.addClassName('special'Wink; buy_button_span.setId(this.getPriceId()); buy_button.appendChild(buy_button_span); send_profile_info.appendChild(buy_button); // NO THANKS var no_thanks = document.createElement('a'Wink; no_thanks.setHref('#'Wink; no_thanks.addClassName('no_thx'Wink; no_thanks.addEventListener("click",this.handleNoThanksClicked,false); var no_thanks_span = document.createElement('span'Wink; no_thanks_span.addClassName('special'Wink; no_thanks_span.setTextValue("No Thanks"Wink; no_thanks.appendChild(no_thanks_span); send_profile_info.appendChild(no_thanks); send_profile_right.appendChild(send_profile_info); cont.appendChild(send_profile_left); cont.appendChild(send_profile_right); } } this.handleNoThanksClicked = function() { closePopup(); return false; } this.handleBuyClicked = function() { if (_buy_button_disabled) return; this.disableBuyButton("Buying..."Wink; var gift = this.getSelectedCategory().getSelectedGift(); if(this.getSelectedCategory().getId() == 1 && this.isRecipient21() != true) { var dialog = new Dialog(); dialog.setStyle('width', '180px'Wink; dialog.showMessage('Error', 'Underage users are ineligible for this gift.'Wink; this.enableBuyButton(); } else { if(this.getChipCount() < gift.getPrice()) { var dialog = new Dialog(); dialog.setStyle('width', '200px'Wink; dialog.showMessage('Error', 'You do not have enough chips to purchase this gift.'Wink; this.enableBuyButton(); } else { var img = document.getElementById('ladder_gift_request_img'Wink; if (img != null) { img.setSrc(gift.getImage()); } var url = 'http://facebook.poker.zynga.com/poker/inc/ajax/ladder_send_gift.php?to_sn='+this.getCurrGiftSN()+'&to_uid='+this.getCurrGiftUid()+'&gift_id='+gift.getId(); var a = new Ajax(); a.requireLogin = true; a.responseType = Ajax.JSON; var obj = this; a.ondone = function (data) { if (data['fbml_form'] != undefined) { friend_name = data['friend_name']; var name = document.getElementById('ladder_gift_friend_name'Wink; if (name != null) { name.setInnerFBML(data['fbml_friend']); } var gift_name = document.getElementById('ladder_gift_name'Wink; if (gift_name != null) { gift_name.setTextValue(data['gift_name']); } var wrapper = document.getElementById('ladder_gift_container_ajax'Wink; if (wrapper != null) { wrapper.setInnerFBML(data['fbml_form']); obj.updateChipTotal(); obj.enableBuyButton(); openPopup(1,'ladder_gift'Wink; } } }; a.post(url); } } } this.updateChipTotal = function() { _current_chips = _current_chips - parseInt(this.getSelectedCategory().getSelectedGift().getPrice()); var points_span = document.getElementById(this.getPointsTotalId()); if (points_span) points_span.setTextValue("$" + addCommas(_current_chips)); closePopup(); } this.updateGiftInformation = function(gift) { var gift_name = document.getElementById(this.getGiftNameId()); if (gift_name) gift_name.setTextValue(gift.getName()); var priceText = 'Buy for $'+addCommas(gift.getPrice()); var price = document.getElementById(this.getPriceId()); if (price) price.setTextValue(priceText); } this.disableBuyButton = function(text) { var gift_price = document.getElementById(this.getPriceId()); if (gift_price) { gift_price.setTextValue(text); _buy_button_disabled = true; } } this.enableBuyButton = function() { _buy_button_disabled = false; this.updateGiftInformation(this.getSelectedCategory().getSelectedGift()); } this.selectCategory = function(cat) { _selected_cat = cat; this.hideCategories(); } this.hideCategories = function() { for (var i = 0; i < _categories.length; i++) { if (_categories[i] == undefined) continue; _categories[i].hide(); } } } LadderGifts.prototype.is21 = function() { return true; } LadderGifts.getObj = (function() { var o = null; return function() { o = o || new LadderGifts(); return o; } })(); function Category() { var _gifts = []; var _gifts_created = false; var _selected_gift = null; var _name = ''; var _str_name = ''; var _id = 0; var _shown = false; this.setName = function(n) { _name = n; } this.getName = function() { return _name; } this.setId = function(i) { _id = i; } this.getId = function() { return _id; } this.setStringName = function(n) { _str_name = n; } this.getStringName = function() { return _str_name; } this.addGift = function(g) { _gifts.push(g); } this.createListItem = function() { var li = document.createElement('li'Wink; li.setId('category_' + this.getStringName()); var name = this.getStringName(); var a = document.createElement('a'Wink; a.addEventListener("click",this.show.bind(this),false); a.setHref("#"Wink; a.setTitle(name); a.setTextValue(this.getName()); li.appendChild(a); return li; } this.getGiftsContainerId = function() { return this.getStringName() + "_mainContainer"; } this.createGiftContainer = function() { var ul = document.createElement('ul'Wink; ul.setId(this.getGiftsContainerId()); ul.addClassName("clearfix"Wink; return ul; } this.getListItemId = function() { return 'category_' + this.getStringName(); } this.getListItemClassName = function() { return 'categorySelected'; } this.selectListItem = function() { var li = document.getElementById(this.getListItemId()); if (li != undefined) { li.addClassName(this.getListItemClassName()); } } this.unSelectListItem = function() { var li = document.getElementById(this.getListItemId()); if (li != undefined) { li.removeClassName(this.getListItemClassName()); } } this.getIconId = function() { return "category_icon_" + this.getStringName(); } this.showIcon = function() { var div = document.getElementById(this.getIconId()); if (div == undefined) { var div_container = document.getElementById('gift_category_left_cont'Wink; if (div_container) { div = document.createElement('div'Wink; div.setId(this.getIconId()); div.addClassName('category_icon_' + this.getStringName()); div.setStyle("display","block"Wink; div_container.appendChild(div); return; } } div.setStyle("display","block"Wink; } this.hideIcon = function() { var div = document.getElementById(this.getIconId()); if (div != undefined) { div.setStyle("display","none"Wink; } } this.hide = function() { if (_shown) { this.hideIcon(); this.unSelectListItem(); this.hideGifts(); } } this.show = function() { LadderGifts.getObj().selectCategory(this); this.showIcon(); this.selectListItem(); this.showGifts(); this.autoselectGift(); _shown = true; } this.showGifts = function() { var cont = document.getElementById(this.getGiftsContainerId()); if (cont != undefined) { if (_gifts_created) { cont.setStyle("display","block"Wink; } else { for (var i = 0; i < _gifts.length; i++) { var gift = _gifts[i]; var li = gift.createHTML(); cont.appendChild(li); } _gifts_created = true; } } } this.hideGifts = function() { var cont = document.getElementById(this.getGiftsContainerId()); if (cont != undefined) { cont.setStyle("display","none"Wink; } } this.selectedGift = function(gift) { _selected_gift = gift; LadderGifts.getObj().updateGiftInformation(gift); this.deselectGifts(); } this.getSelectedGift = function() { return _selected_gift; } this.deselectGifts = function() { for (var i = 0; i < _gifts.length; i++) { _gifts[i].deselect(); } } this.autoselectGift = function() { if (_gifts.length > 0) { _gifts[0].select(); } } } function Gift() { var _name = ""; var _price = ""; var _id = ""; var _image = ""; var _cat_id = 0; this.setName = function(n) { _name = n; } this.getName = function() { return _name; } this.setPrice = function(p) { _price = p; } this.getPrice = function() { return _price; } this.setId = function(i) { _id = i; } this.getId = function() { return _id; } this.setImage = function(img) { _image = img; } this.getImage = function() { return _image; } this.setCategoryId = function(i) { _cat_id = i; } this.getCategoryId = function() { return _cat_id; } this.getContainerId = function() { return this.getName() + "_list"; } this.createHTML = function() { var li = document.createElement('li'Wink; li.setId(this.getContainerId()); var a = document.createElement('a'Wink; a.setHref('#'Wink; a.addEventListener("click",this.select.bind(this),false); var icon_img_cont = document.createElement('div'Wink; icon_img_cont.addClassName("icon_img"Wink; var icon_img = document.createElement('img'Wink; icon_img.setSrc(this.getImage()); icon_img.alt = this.getName(); icon_img_cont.appendChild(icon_img); a.appendChild(icon_img_cont); var icon_name = document.createElement('div'Wink; icon_name.addClassName("icon_name"Wink; icon_name.setTextValue(this.getName()); a.appendChild(icon_name); var icon_price = document.createElement('div'Wink; icon_price.addClassName("icon_price"Wink; icon_price.setTextValue("$"+this.getPrice()); a.appendChild(icon_price); li.appendChild(a); return li; } this.getSelectedClassName = function() { return "selected"; } this.select = function() { var li = document.getElementById(this.getContainerId()); if (li != undefined) { LadderGifts.getObj().getCategory(this.getCategoryId()).selectedGift(this); li.addClassName(this.getSelectedClassName()); } } this.deselect = function() { var li = document.getElementById(this.getContainerId()); if (li != undefined) { li.removeClassName(this.getSelectedClassName()); } } }

mungkin ada sesuatu...??? mohon pencerahan kakak2 Shock
berusahalah untuk tidak berfikir menjadi seorang yang sukses, tapi berusahalah menjadi orang yang berguna...!!!
 
Offline
16-01-2010 05:25 AM RE: code error zynga poker...??
User Avatar

EVA-00
HackAge


Posts: 2770
Joined: 21.05.08
Location: Wallahu a'lam
Age: 33
itu bukan error, tapi browser lu telat baca script yang akan di proses sama browser, dan tampilah client-script yang elu posting.

btw kl bisa elu bikin screenshot gambarnya aja bro, ga usah posting code nya kayak gitu. coz kagak enak di liat lol
Nabi Muhammad SAW bersabda :” Barangsiapa Yang Mengamalkan Ilmu Yang Ia Ketahui Maka Allah Akan Memberikan Kepadanya Ilmu Yang Belum Ia Ketahui” (HR. Imam Ahmad).

..::shn6 u!vJq Jnoh 3Joldx3 d33>I::..
 
Offline
16-01-2010 05:31 AM RE: code error zynga poker...??
User Avatar

rizalufikri
Murid Akademi II


Posts: 24
Joined: 08.11.09
sip ka eva..!! tadi telat pencet printscreenya..!! hehehe.. thanx infonya... mohon bimbingannya kakakBuble
berusahalah untuk tidak berfikir menjadi seorang yang sukses, tapi berusahalah menjadi orang yang berguna...!!!
 
Offline
Jump to Forum:
Forum powered by fusionBoard
Share this Thread
URL:
BBcode:
HTML:
Similar Threads
Thread Forum Replies Last Post
Error Getting HostName Java 2 26-11-2013 10:20
Dasar Pemrograman Java - Chapter01 x Requirement, Compile, Error & Run Java 3 01-04-2012 10:33
Eve 6-Speak In Code (2012) MP3 Album 1 31-01-2012 12:36
POKER LIVE TOURNAMENTS Info Seminar, Event, Pameran, Etc 16 24-02-2011 18:01
[Ask] flashdisk error Out Of Topic 3 26-01-2011 19:29
Copyright © 2007-2016