Mistři v programování na #hovnokod

function formValidator(){
    // Check each input in the order that it appears in the form!
    if(isAlphabet(firstname)){
        if(isAlphabet(surname)){
            if(isAlphabet(surname)){
                if(ValidateDate(dob)){
                    if(isAlphabet(pgname)){
                        if(isAlphanumeric(Address1)){
                            if(isAlphanumeric(Address2)){
                                if(isAlphanumeric(Address3)){
                                    if(isAlphanumeric(Address4)){
                                        if(isAlphanumeric(Address5)){
                                            if(emailValidator(Email)){
                                                if(PhoneValidator(lan)){
                                                    if(PhoneValidator(mobile)){
                                                        if(Sessions()){
                                                            return true;
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return false;
}

Anonymous,

40x v jediném dokumentu, měnilo se jen ID. Jako...srsly??

$(function() {
	$("#opener8").hover(function() {
		$(this).css('cursor','pointer');
	},
	function () {
		$(this).css('cursor','auto');
	});
});

Anonymous,

Nepamatuju si to presne, ale takhle nejak to vypadalo. Chvilku mi trvalo, nez jsem zjistil, proc IE6 po nacteni stranky hlasi javascriptovy "Unknown runtime error".

<script>
    var noscript = document.createElement('noscript');
    document.body.appendChild(noscript);
    noscript.innerHTML = "Musite mit zapnuty javascript";
</script>

Anonymous,

niet nad presnou specifikaci elementu...

this.insertQuote = function( elementObject, finalObject , type )
    {
        text = '';
        userName = elementObject.parent().parent().parent().parent().prev().children().children().next().html();
        textData = elementObject.parent().parent().parent().parent().prev().children().next().children().next().next().next().html();

        finalText = $(finalObject).val();
        cursorPosition = $(finalObject).getCursorPosition();
        dataTextSize = finalText.length;

        prefix = finalText.substring(0,cursorPosition)
        postfix = finalText.substring(cursorPosition,dataTextSize)

        text = prefix +'[quote="'+userName+'" ] ' + textData + '[/quote]' + postfix;
        $(finalObject).val( text );
    }

Anonymous,

random color code

function randomBg()
{
var hex1=new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
var hex2=new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
var hex3=new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
var hex4=new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
var hex5=new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
var hex6=new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
var bg="#"+hex1[Math.floor(Math.random()*hex1.length)]+hex2[Math.floor(Math.random()*hex2.length)]+hex3[Math.floor(Math.random()*hex3.length)]+hex4[Math.floor(Math.random()*hex4.length)]+hex5[Math.floor(Math.random()*hex5.length)]+hex6[Math.floor(Math.random()*hex6.length)]
return bg
}

Anonymous,