How many WTFs can you spot



  • https://ww3.njtransit.com/LostAndFound/resources/jsp/lf_lost_input.jsp

    Edit: Oh shit, I guess i"m in trouble now.

    • INFORMATION CONTAINED HEREIN IS PROPRIETARY AND CONFIDENTIAL
    • AND IMPROPER USE OR DISCLOSURE MAY RESULT IN CIVIL AND PENAL SANCTIONS\

    Anyone?

    Hint: View Source.

    Some nice gems here:

    https://ww3.njtransit.com/LostAndFound/resources/javascript/validate.js



  • It appears to be jsp (https://en.wikipedia.org/wiki/JavaServer_Pages) which seems to be a java->javascript templating engine, so the huge repetitions are probably abstracted in for loops at the java side. Weird choice but the true jsp sources could well be clean to read.



  • @CreatedToDislikeThis said in How many WTFs can you spot:

    It appears to be jsp (https://en.wikipedia.org/wiki/JavaServer_Pages) which seems to be a java->javascript templating engine, so the huge repetitions are probably abstracted in for loops at the java side. Weird choice but the true jsp sources could well be clean to read.

    I think you're missing the obvious:

    Just from a cursory glance:

    <link href="http://localhost:7001/styles/print.css" rel="stylesheet" type="text/css" media="print"  />
    <link href="http://localhost:7001/styles/styles.css" rel="stylesheet" type="text/css" media="screen" />
    
    <script language="JavaScript" src="http://localhost:7001/javascript/date.js"></script>
    <script language="JavaScript" src="http://localhost:7001/javascript/dhtml_menu_script.js"></script>
    <script language="JavaScript" src="http://localhost:7001/javascript/page_load.js"></script>
    <script language="JavaScript" src="http://localhost:7001/javascript/new_win.js"></script>
    <script language="JavaScript" src="http://localhost:7001/javascript/showaddress.js"></script>
    
    function trim(a)
    {
       	b = ltrim(a);
    	c =	rtrim(b);
    	return c;
    }
    
    function ltrim(a)
    {
    	while (a.charAt(0) == " ")
    	{
    		a = a.substring(1,a.length);
    	}
    	return a;
    }
    
    function rtrim(a)
    {
    	while (a.charAt(a.length-1) == " ")
    	{
    		a = a.substring(0,a.length-1);
    	}
    	return a;
    }
    
    function isEmail(val,name,bool){
    	if(isLength(val,name,bool)){
    		 var intLen
    		 var intLoop
    		 var intChar
    		 var strEmail
    		 var intPosDot
    		 strEmail=new String(val.value);
    		 intPosDot = strEmail.lastIndexOf(".");
    		 intPosAt = strEmail.indexOf("@");
    		 if (intPosAt == "-1" || strEmail.indexOf(".") == "-1" ){
    			alert("Please enter a valid e-mail address.\nEx:YourName@DomainName.xxx");
    			val.select();
    			return false;
    		 }
    		 if (intPosAt > intPosDot){
    		 	alert("Please enter a valid e-mail address.\nEx:YourName@DomainName.xxx");
    			val.select();
    			return false;
    		 }
    		 if((strEmail.substring(intPosDot+1).length) < 2){
    		 	alert("Please enter a valid e-mail address.\nEx:YourName@DomainName.xxx");
    		 	val.select();
    		 	return false;
    		 }else{
    			intLen=strEmail.length;
    			for(intLoop=0;intLoop<intLen;intLoop++){
    				intChar=strEmail.charCodeAt(intLoop)
    				if (!((intChar>=48 && intChar<=57) || (intChar>=97 && intChar<=122) ||(intChar>=65 && intChar<=90) || (intChar==95) ||(intChar==46) ||(intChar==64)||(intChar==39))){
    					alert("Please enter a valid e-mail address.\nEx:YourName@DomainName.xxx");
    					val.select();
    					return false;
    				}
    			}
    		}
                return true;
    	}
    	//return true;
    }
    

    The reason I decided to look at the source was because it wouldn't take my email address because it has a - in it. Apparently underscores are supported, but dashes are not.


  • Winner of the 2016 Presidential Election Banned

    So far I think my favorite part is the 300-entry array of possible item types that gets completely iterated through every time you select a category of item so that it can display appropriate item descriptions in the drop-down.

    var itemsArray = new Array();
    
                      
                            itemsArray[0] = "1670~1160~AT-Cin/Blk-Ber";
                      
                            itemsArray[1] = "1671~1160~AT-Cin/HTC";
                      
                            itemsArray[2] = "1660~1160~AT-Cin/LG";
                      
                            itemsArray[3] = "1801~1160~AT-Cin/Motorola";
                      
                            itemsArray[4] = "1662~1160~AT-Cin/Nokia";
                      
                            itemsArray[5] = "1675~1160~AT-Cin/Other";
                      
                            itemsArray[6] = "1666~1160~AT-Cin/Palm";
                      
                            itemsArray[7] = "1664~1160~AT-Cin/Pantec";
                      
                            itemsArray[8] = "1661~1160~AT-Cin/S-Eric";
                      
                            itemsArray[9] = "1663~1160~AT-Cin/Samun";
                      
                            itemsArray[10] = "1672~1160~AT-Cin/Sierra";
                      
                            itemsArray[11] = "1700~1160~ATT/i-Phone";
                      
                            itemsArray[12] = "97~11~Alcohol";
                      
                            itemsArray[13] = "115~1~Appliance";
                      
                            itemsArray[14] = "1241~2~Apron";
                      
                            itemsArray[15] = "2120~1200~Art Portfolio";
                      
                            itemsArray[16] = "123~1200~Art Supplies";
                      
                            itemsArray[17] = "122~10~Baby Blanket";
                      
                            itemsArray[18] = "70~10~Baby Stroller/Carriage";
                      
                            itemsArray[19] = "104~1120~Back Pack/Book Bag";
                      
                            itemsArray[20] = "132~7~Ball";
                      
                            itemsArray[21] = "88~7~Baseball Glove";
                      
                            itemsArray[22] = "2185~12~Basket";
                      
                            itemsArray[23] = "131~7~Bat";
                      
                            itemsArray[24] = "112~1~Battery";
                      
                            itemsArray[25] = "130~2~Belt";
                      
                            itemsArray[26] = "1420~9~Bible";
                      
                            itemsArray[27] = "9~7~Bicycles";
                      
                            itemsArray[28] = "10~9~Binder";
                      
                            itemsArray[29] = "1560~7~Binocular";
                      
                            itemsArray[30] = "69~12~Blanket";
                      
                            itemsArray[31] = "1367~1~Blk-berry Case";
                      
                            itemsArray[32] = "2000~1200~Blue Prints";
                      
                            itemsArray[33] = "1366~1~Bluetooth";
                      
                            itemsArray[34] = "2242~1160~Boost Mobile";
                      
                            itemsArray[35] = "91~3~Boots";
                      
                            itemsArray[36] = "1201~12~Box";
                      
                            itemsArray[37] = "72~4~Bracelet";
                      
                            itemsArray[38] = "3~1120~Briefcase";
                      
                            itemsArray[39] = "64~1~CD/CD Holder";
                      
                            itemsArray[40] = "1160~1~Calculator";
                      
                            itemsArray[41] = "113~9~Calendar";
                      
                            itemsArray[42] = "106~1~Camcorder";
                      
                            itemsArray[43] = "14~1~Camera";
                      
                            itemsArray[44] = "1360~1~Camera Acces";
                      
                            itemsArray[45] = "28~1140~Cane";
                      
                            itemsArray[46] = "1789~10~Car/Booster Seat";
                      
                            itemsArray[47] = "2402~12~Cardboard tube";
                      
                            itemsArray[48] = "1368~1~Cell Charger";
                      
                            itemsArray[49] = "1361~1~Cell Phone Clip";
                      
                            itemsArray[50] = "1580~1~Charger";
                      
                            itemsArray[51] = "16~5~Check/Checkbook";
                      
                            itemsArray[52] = "1441~9~Clip Board";
                      
                            itemsArray[53] = "2520~1180~Clock";
                      
                            itemsArray[54] = "120~10~Clothing";
                      
                            itemsArray[55] = "44~2~Coat";
                      
                            itemsArray[56] = "105~9~Comic Book";
                      
                            itemsArray[57] = "98~5~Contact Lenses";
                      
                            itemsArray[58] = "96~7~Cooler";
                      
                            itemsArray[59] = "1263~5~Cosmetics Bag/Cosmetics";
                      
                            itemsArray[60] = "2183~12~Craft/Hobby Supplies";
                      
                            itemsArray[61] = "27~1140~Crutch";
                      
                            itemsArray[62] = "1260~4~Cufflinks";
                      
                            itemsArray[63] = "2680~1180~Curtain Rod";
                      
                            itemsArray[64] = "1822~1180~Cutlery";
                      
                            itemsArray[65] = "1344~1~DVD Player";
                      
                            itemsArray[66] = "1265~1140~Denture/Teeth";
                      
                            itemsArray[67] = "1542~1140~Diabetes Kit";
                      
                            itemsArray[68] = "61~10~Diaper Bag";
                      
                            itemsArray[69] = "1523~1~Digital Recorde";
                      
                            itemsArray[70] = "1820~1180~Dish Drain";
                      
                            itemsArray[71] = "1320~1~Display Key";
                      
                            itemsArray[72] = "1187~6~Document";
                      
                            itemsArray[73] = "83~8~Doll";
                      
                            itemsArray[74] = "1460~1200~Drawings";
                      
                            itemsArray[75] = "51~2~Dress";
                      
                            itemsArray[76] = "29~6~Drivers License";
                      
                            itemsArray[77] = "1140~1120~Duffel Bag";
                      
                            itemsArray[78] = "1404~2~Ear Muffs";
                      
                            itemsArray[79] = "75~4~Earring";
                      
                            itemsArray[80] = "1182~1~Electric Games";
                      
                            itemsArray[81] = "32~1~Electronic Organizer";
                      
                            itemsArray[82] = "1880~1~Electronic Reader/Tablet";
                      
                            itemsArray[83] = "1220~9~Envelope";
                      
                            itemsArray[84] = "2061~1100~Event Tickets";
                      
                            itemsArray[85] = "30~5~Eye Glasses/Case";
                      
                            itemsArray[86] = "1380~2~Fabric";
                      
                            itemsArray[87] = "137~8~Figurine";
                      
                            itemsArray[88] = "1760~7~Fishing Rod";
                      
                            itemsArray[89] = "1860~7~Fitness/Exercise Related";
                      
                            itemsArray[90] = "2021~1~Flash Drive";
                      
                            itemsArray[91] = "111~1~Flashlight";
                      
                            itemsArray[92] = "116~3~Flats";
                      
                            itemsArray[93] = "11~9~Folder";
                      
                            itemsArray[94] = "79~7~Folding Chair";
                      
                            itemsArray[95] = "78~11~Food";
                      
                            itemsArray[96] = "33~12~Foreign Currency";
                      
                            itemsArray[97] = "99~1200~Framed Art";
                      
                            itemsArray[98] = "90~2~Fur Coat";
                      
                            itemsArray[99] = "1402~1~GPS";
                      
                            itemsArray[100] = "80~8~Games";
                      
                            itemsArray[101] = "1346~1120~Garment Bag";
                      
                            itemsArray[102] = "2721~1120~Gift Bag";
                      
                            itemsArray[103] = "46~2~Gloves/Mittens";
                      
                            itemsArray[104] = "134~7~Golf Bag";
                      
                            itemsArray[105] = "87~7~Golf Club";
                      
                            itemsArray[106] = "1403~6~Green Card";
                      
                            itemsArray[107] = "1821~1180~Grill";
                      
                            itemsArray[108] = "2040~1140~Guide Stick";
                      
                            itemsArray[109] = "1345~1120~Gym Bag";
                      
                            itemsArray[110] = "2420~12~Hair/Accessories";
                      
                            itemsArray[111] = "2760~12~Hand Truck";
                      
                            itemsArray[112] = "125~9~Hard Cover";
                      
                            itemsArray[113] = "45~2~Hat";
                      
                            itemsArray[114] = "139~1~Headphones";
                      
                            itemsArray[115] = "1401~1140~Hearing Aid";
                      
                            itemsArray[116] = "117~3~Heels";
                      
                            itemsArray[117] = "1480~7~Helmet";
                      
                            itemsArray[118] = "1797~7~Hockey Stick";
                      
                            itemsArray[119] = "1920~1160~INTERNATIONAL SERVICE";
                      
                            itemsArray[120] = "2401~1~IPAD";
                      
                            itemsArray[121] = "66~1~IPOD/MP3 ";
                      
                            itemsArray[122] = "1300~6~Id Holder";
                      
                            itemsArray[123] = "25~6~Identification Card";
                      
                            itemsArray[124] = "1200~2~Jacket/Fall or Spring Outerwear";
                      
                            itemsArray[125] = "34~4~Jewelry";
                      
                            itemsArray[126] = "2020~1~Keyboard";
                      
                            itemsArray[127] = "5~5~Keys/Key Ring";
                      
                            itemsArray[128] = "2600~12~Knife";
                      
                            itemsArray[129] = "1796~7~Lacrosse Stick";
                      
                            itemsArray[130] = "2660~1180~Lamp";
                      
                            itemsArray[131] = "1522~1~Laptop Bag/Case";
                      
                            itemsArray[132] = "36~1~Laptop Computer/PC";
                      
                            itemsArray[133] = "1840~1120~Laundry Bag";
                      
                            itemsArray[134] = "2740~12~License Plates";
                      
                            itemsArray[135] = "2080~1180~Liquids/Detergents";
                      
                            itemsArray[136] = "118~3~Loafer";
                      
                            itemsArray[137] = "38~1120~Luggage";
                      
                            itemsArray[138] = "2722~1120~Lunch Bag";
                      
                            itemsArray[139] = "2200~1200~Map";
                      
                            itemsArray[140] = "2620~12~Material";
                      
                            itemsArray[141] = "1521~6~Medicaid Card";
                      
                            itemsArray[142] = "1520~6~Medicare Card";
                      
                            itemsArray[143] = "59~1140~Medication";
                      
                            itemsArray[144] = "1783~1160~Metro PCS/Kyocera";
                      
                            itemsArray[145] = "1786~1160~Metro PCS/LG";
                      
                            itemsArray[146] = "1785~1160~Metro PCS/Motorola";
                      
                            itemsArray[147] = "1784~1160~Metro PCS/Nokia";
                      
                            itemsArray[148] = "1940~1160~Metro PCS/Other";
                      
                            itemsArray[149] = "1787~1160~Metro PCS/Samsung";
                      
                            itemsArray[150] = "2182~1~Microphone";
                      
                            itemsArray[151] = "1543~1140~Mobility Device";
                      
                            itemsArray[152] = "1500~5~Money Clip";
                      
                            itemsArray[153] = "1120~1100~Monthly Pass";
                      
                            itemsArray[154] = "2160~1~Mouse/Mouse Pad";
                      
                            itemsArray[155] = "1180~12~Musical Instruments";
                      
                            itemsArray[156] = "73~4~Necklace";
                      
                            itemsArray[157] = "2202~3~Non-Slip Shoe Grip";
                      
                            itemsArray[158] = "2320~12~Notary Stamp";
                      
                            itemsArray[159] = "1342~9~Notebook";
                      
                            itemsArray[160] = "119~3~Oxford";
                      
                            itemsArray[161] = "6~1~PC";
                      
                            itemsArray[162] = "52~2~PJs";
                      
                            itemsArray[163] = "1782~1160~PREPAID CELL PHONE";
                      
                            itemsArray[164] = "8~1~Pagers";
                      
                            itemsArray[165] = "40~1~Palm Pilot";
                      
                            itemsArray[166] = "49~2~Pants/Sweatpants";
                      
                            itemsArray[167] = "124~9~Paperback";
                      
                            itemsArray[168] = "41~6~Passport";
                      
                            itemsArray[169] = "1381~1100~Path Tickets/Metro Card";
                      
                            itemsArray[170] = "102~9~Pen";
                      
                            itemsArray[171] = "103~9~Pencil";
                      
                            itemsArray[172] = "42~11~Perishables";
                      
                            itemsArray[173] = "77~12~Pet Carrier";
                      
                            itemsArray[174] = "24~6~Phone Card";
                      
                            itemsArray[175] = "43~1200~Photograph";
                      
                            itemsArray[176] = "1980~12~Pillow";
                      
                            itemsArray[177] = "1341~9~Planner";
                      
                            itemsArray[178] = "62~11~Plant";
                      
                            itemsArray[179] = "1720~1120~Plastic Bag";
                      
                            itemsArray[180] = "7~5~Pocketbook";
                      
                            itemsArray[181] = "2581~7~Pole";
                      
                            itemsArray[182] = "2184~7~Pool Stick/Cue";
                      
                            itemsArray[183] = "1189~1~Portable Mem";
                      
                            itemsArray[184] = "12~9~Portfolio";
                      
                            itemsArray[185] = "60~12~Postage Stamps";
                      
                            itemsArray[186] = "1788~1200~Posters";
                      
                            itemsArray[187] = "2023~1~Power Cables/Adapter";
                      
                            itemsArray[188] = "133~7~Racket";
                      
                            itemsArray[189] = "85~1~Radio";
                      
                            itemsArray[190] = "92~2~Rain Coat";
                      
                            itemsArray[191] = "2640~12~Record";
                      
                            itemsArray[192] = "1243~6~Reduced Fare";
                      
                            itemsArray[193] = "1960~5~Religious Articles";
                      
                            itemsArray[194] = "1321~1~Remote Control";
                      
                            itemsArray[195] = "2181~1140~Retainer/Mouth Guard";
                      
                            itemsArray[196] = "74~4~Ring";
                      
                            itemsArray[197] = "2541~12~Rug";
                      
                            itemsArray[198] = "26~6~SS Card";
                      
                            itemsArray[199] = "53~3~Sandals";
                      
                            itemsArray[200] = "47~2~Scarf/Shawl";
                      
                            itemsArray[201] = "13~9~School Book";
                      
                            itemsArray[202] = "135~7~Scooter";
                      
                            itemsArray[203] = "1365~1100~Septa Ticket";
                      
                            itemsArray[204] = "1100~2~Shirts/Blouses/Vests";
                      
                            itemsArray[205] = "1181~1120~Shopping Bags";
                      
                            itemsArray[206] = "129~2~Shorts";
                      
                            itemsArray[207] = "1347~1120~Shoulder/Messenger Bag";
                      
                            itemsArray[208] = "2480~12~Sign";
                      
                            itemsArray[209] = "1600~7~Skateboard";
                      
                            itemsArray[210] = "2260~7~Skates";
                      
                            itemsArray[211] = "2560~12~Sketch Pad";
                      
                            itemsArray[212] = "127~2~Skirt";
                      
                            itemsArray[213] = "1900~7~Sleeping Bag";
                      
                            itemsArray[214] = "1184~3~Slippers/Flip Flops";
                      
                            itemsArray[215] = "1740~1120~Small Pouch";
                      
                            itemsArray[216] = "2360~12~Smoking/Accessories";
                      
                            itemsArray[217] = "71~3~Sneakers";
                      
                            itemsArray[218] = "54~2~Socks";
                      
                            itemsArray[219] = "114~1~Speaker";
                      
                            itemsArray[220] = "2240~1160~Sprint-Android";
                      
                            itemsArray[221] = "2220~1160~Sprint-HTC";
                      
                            itemsArray[222] = "2400~1160~Sprint-IPhone";
                      
                            itemsArray[223] = "1802~1160~Sprint/Blk Berr";
                      
                            itemsArray[224] = "1623~1160~Sprint/LG";
                      
                            itemsArray[225] = "1624~1160~Sprint/Motorola";
                      
                            itemsArray[226] = "1620~1160~Sprint/Nextel";
                      
                            itemsArray[227] = "1627~1160~Sprint/Novatel";
                      
                            itemsArray[228] = "1628~1160~Sprint/Other";
                      
                            itemsArray[229] = "1625~1160~Sprint/Palm";
                      
                            itemsArray[230] = "1621~1160~Sprint/Samsun";
                      
                            itemsArray[231] = "1622~1160~Sprint/Sanyo";
                      
                            itemsArray[232] = "1626~1160~Sprint/Sierra";
                      
                            itemsArray[233] = "1524~9~Stationary";
                      
                            itemsArray[234] = "81~8~Stuffed Toy";
                      
                            itemsArray[235] = "50~2~Suit";
                      
                            itemsArray[236] = "1794~2~Suit Jacket/Sports Coat/Blazer";
                      
                            itemsArray[237] = "31~5~Sun Glasses";
                      
                            itemsArray[238] = "57~2~Sweater";
                      
                            itemsArray[239] = "56~2~Sweatshirt";
                      
                            itemsArray[240] = "1639~1160~T-Mobile/Blk Be";
                      
                            itemsArray[241] = "2440~1160~T-Mobile/HTC";
                      
                            itemsArray[242] = "2500~1160~T-Mobile/IPhone";
                      
                            itemsArray[243] = "2460~1160~T-Mobile/LG";
                      
                            itemsArray[244] = "1642~1160~T-Mobile/Nokia";
                      
                            itemsArray[245] = "1643~1160~T-Mobile/Sam";
                      
                            itemsArray[246] = "1640~1160~T-mobile/Google (G1)";
                      
                            itemsArray[247] = "1641~1160~T-mobile/Motor";
                      
                            itemsArray[248] = "1647~1160~T-mobile/Other";
                      
                            itemsArray[249] = "1644~1160~T-mobile/Sidekick";
                      
                            itemsArray[250] = "1645~1160~T-mobile/Sony";
                      
                            itemsArray[251] = "1781~1160~TTY/TTD Video Phone";
                      
                            itemsArray[252] = "2580~1~TV";
                      
                            itemsArray[253] = "63~1~Tapes";
                      
                            itemsArray[254] = "2521~7~Team Logo Items";
                      
                            itemsArray[255] = "1340~9~Tele/Add book";
                      
                            itemsArray[256] = "2380~7~Tent";
                      
                            itemsArray[257] = "95~12~Thermos/Coffee/Travel Mug";
                      
                            itemsArray[258] = "55~2~Tie";
                      
                            itemsArray[259] = "1881~5~Toiletries";
                      
                            itemsArray[260] = "37~12~Tools";
                      
                            itemsArray[261] = "1348~1120~Tote Bag";
                      
                            itemsArray[262] = "84~8~Toy Ball";
                      
                            itemsArray[263] = "82~8~Toy Truck";
                      
                            itemsArray[264] = "121~10~Toys";
                      
                            itemsArray[265] = "136~8~Train";
                      
                            itemsArray[266] = "2700~12~Tripod";
                      
                            itemsArray[267] = "1823~1180~Tuperware";
                      
                            itemsArray[268] = "101~2~Tuxedo";
                      
                            itemsArray[269] = "67~12~US Currency";
                      
                            itemsArray[270] = "1~5~Umbrella";
                      
                            itemsArray[271] = "107~1~VCR";
                      
                            itemsArray[272] = "109~1~VCR Tape";
                      
                            itemsArray[273] = "2341~1160~Verizon-HTC";
                      
                            itemsArray[274] = "1629~1160~Verizon/Blk.Ber";
                      
                            itemsArray[275] = "2280~1160~Verizon/IPhone";
                      
                            itemsArray[276] = "1633~1160~Verizon/LG";
                      
                            itemsArray[277] = "1632~1160~Verizon/Motor";
                      
                            itemsArray[278] = "1634~1160~Verizon/Nokia";
                      
                            itemsArray[279] = "1637~1160~Verizon/Other";
                      
                            itemsArray[280] = "1630~1160~Verizon/PDA";
                      
                            itemsArray[281] = "1636~1160~Verizon/Palm";
                      
                            itemsArray[282] = "1631~1160~Verizon/Samsu";
                      
                            itemsArray[283] = "2300~1160~Virgin- Mobile";
                      
                            itemsArray[284] = "1400~1140~Voice Box";
                      
                            itemsArray[285] = "1541~1140~Walker";
                      
                            itemsArray[286] = "1440~1~Walkie Talkie";
                      
                            itemsArray[287] = "65~1~Walkman/CD player";
                      
                            itemsArray[288] = "2100~1180~Wall Mirror";
                      
                            itemsArray[289] = "4~5~Wallet";
                      
                            itemsArray[290] = "76~4~Watch";
                      
                            itemsArray[291] = "1190~1100~Weekly Tickets";
                      
                            itemsArray[292] = "2022~1~Wireless Internet Card/USB";
                      
                            itemsArray[293] = "1343~6~Work ID";
                      
                            itemsArray[294] = "2340~12~Wrapping Paper";
                      
                            itemsArray[295] = "86~5~Wristlet/Change Purse";
                      
                            itemsArray[296] = "1795~1140~XRay/Med Records";
                      
                            itemsArray[297] = "2522~7~Yoga Items";
                      
                            itemsArray[298] = "108~1~dvd/dvd Holde";
                      
                            itemsArray[299] = "2540~1140~stethoscope";
                      
    
    
                      function selectedCategory(){
    
                            while(document.getElementById("frm_lf_input_form").selDescription.options.length!=1){
                                 document.getElementById("frm_lf_input_form").selDescription.remove(1);
                            }
    
                            var selectedindex = document.getElementById("frm_lf_input_form").selCategory.selectedIndex;
                            var selectedvalue = document.getElementById("frm_lf_input_form").selCategory.options[selectedindex].value;
                            var strOptText = document.getElementById("frm_lf_input_form").selCategory.options[selectedindex].text;
    			            if(strOptText.toUpperCase().indexOf('CELL PHONE') > -1){
                				document.unpoppedLayer =  eval('document.getElementById("normalLabel")');
    							document.poppedLayer =  eval('document.getElementById("cellLabel")');
                				document.unpoppedLayer2 =  eval('document.getElementById("normalLabel2")');
    							document.poppedLayer2 =  eval('document.getElementById("cellLabel2")');							
    			            } else {
                			   	document.poppedLayer =  eval('document.getElementById("normalLabel")');
    							document.unpoppedLayer =  eval('document.getElementById("cellLabel")');
    							document.poppedLayer2 =  eval('document.getElementById("normalLabel2")');
    							document.unpoppedLayer2 =  eval('document.getElementById("cellLabel2")');
    		                }
    			            document.poppedLayer.style.display = "inline";
    						document.unpoppedLayer.style.display = "none";
    			            document.poppedLayer2.style.display = "inline";
    						document.unpoppedLayer2.style.display = "none";						
                            for (var i=0;i<itemsArray.length;i++){
                                  strItem = itemsArray[i];
                                  if (strItem.substring(strItem.indexOf('~')+1,strItem.lastIndexOf('~'))==selectedvalue){
            	                        document.getElementById("frm_lf_input_form").selDescription.options[document.getElementById("frm_lf_input_form").selDescription.options.length] = 
                	                    new Option(strItem.substring(strItem.lastIndexOf('~')+1, strItem.length),strItem.substring(0,strItem.indexOf('~')));
                                  }
                            }
                      }
    

    Bonus points for 16 lines of code to determine whether the user selected the Cell Phones category or not, and to make two labels say either "Carrier/Make" and "Cell Number" or "Description" and "Make". Regardless of whether or not those labels even need to change, much less if it's a good idea to use the same fields for those. And double bonus points for the weird indentation on those lines.


  • Winner of the 2016 Presidential Election Banned

    
    	<TD><FONT size="2" face="Arial"> <SELECT name="selState" class="textBox">
    			<OPTION value="">Select State </OPTION>
    			<OPTION value="4">AK </OPTION>
    			<OPTION value="2">AL </OPTION>
    			<OPTION value="6">AR </OPTION>
    			<OPTION value="5">AZ </OPTION>
    			<OPTION value="7">CA </OPTION>
    			<OPTION value="8">CO </OPTION>
    			<OPTION value="9">CT </OPTION>
    			<OPTION value="11">DC </OPTION>
    			<OPTION value="10">DE </OPTION>
    			<OPTION value="12">FL </OPTION>
    			<OPTION value="13">GA </OPTION>
    			<OPTION value="14">HI </OPTION>
    			<OPTION value="18">IA </OPTION>
    			<OPTION value="15">ID </OPTION>
    			<OPTION value="16">IL </OPTION>
    			<OPTION value="17">IN </OPTION>
    			<OPTION value="19">KS </OPTION>
    			<OPTION value="20">KY </OPTION>
    			<OPTION value="21">LA </OPTION>
    			<OPTION value="24">MA </OPTION>
    			<OPTION value="23">MD </OPTION>
    			<OPTION value="22">ME </OPTION>
    			<OPTION value="25">MI </OPTION>
    			<OPTION value="26">MN </OPTION>
    			<OPTION value="28">MO </OPTION>
    			<OPTION value="27">MS </OPTION>
    			<OPTION value="29">MT </OPTION>
    			<OPTION value="34">NC </OPTION>
    			<OPTION value="35">ND </OPTION>
    			<OPTION value="30">NE </OPTION>
    			<OPTION value="32">NH </OPTION>
    			<OPTION value="3">NJ </OPTION>
    			<OPTION value="33">NM </OPTION>
    			<OPTION value="31">NV </OPTION>
    			<OPTION value="1">NY </OPTION>
    			<OPTION value="1000">None </OPTION>
    			<OPTION value="36">OH </OPTION>
    			<OPTION value="37">OK </OPTION>
    			<OPTION value="38">OR </OPTION>
    			<OPTION value="39">PA </OPTION>
    			<OPTION value="40">PR </OPTION>
    			<OPTION value="41">RI </OPTION>
    			<OPTION value="42">SC </OPTION>
    			<OPTION value="43">SD </OPTION>
    			<OPTION value="44">TN </OPTION>
    			<OPTION value="45">TX </OPTION>
    			<OPTION value="46">UT </OPTION>
    			<OPTION value="48">VA </OPTION>
    			<OPTION value="53">VI </OPTION>
    			<OPTION value="47">VT </OPTION>
    			<OPTION value="49">WA </OPTION>
    			<OPTION value="51">WI </OPTION>
    			<OPTION value="50">WV </OPTION>
    			<OPTION value="52">WY </OPTION>
    		</SELECT> </FONT></TD>
    
    

    Even the New Jersey Transit acknowledges that New Jersey sucks - so much so, even, that they assign #1 to New York, not New Jersey. They even assigned Alabama #2. New Jersey gets a piddly little #3, and then the rest are in pseudo-alphabetical order.

    As an added bonus, three non-state postal codes are included. Washington, D.C. merited one, presumably because it's pretty damn close to New Jersey, Puerto Rico, probably because it's one of the larger territories and it's kind of sort of close to New Jersey? and... the Virgin Islands... because... uh... why? They barely have a six digit population. I guess that's why their number is outside of the somewhat-alphabetical-order system, whereas DC and PR take numeric precedence over actual states.



  • @Fox said in How many WTFs can you spot:

    As an added bonus, three non-state postal codes are included. Washington, D.C. merited one, presumably because it's pretty damn close to New Jersey, Puerto Rico, probably because it's one of the larger territories and it's kind of sort of close to New Jersey? and... the Virgin Islands... because... uh... why? They barely have a six digit population. I guess that's why their number is outside of the somewhat-alphabetical-order system, whereas DC and PR take numeric precedence over actual states.

    Uhhh what? None of those are postal codes, plus we call them zip codes over here.

    I think you mean they included 3 non-states on the list, and while they're not technically states, they do usually go into the state field.


  • Discourse touched me in a no-no place

    Child is now a gender.

    0_1489169358944_upload-123e388e-0378-439d-9ee9-ccfbb211cc2c


  • ♿ (Parody)

    @loopback0 Stefoknee agrees!


  • Discourse touched me in a no-no place

    @boomzilla said in How many WTFs can you spot:

    Stefoknee

    No disassemble Stefoknee. Joknee Fyve alive.


  • Winner of the 2016 Presidential Election Banned

    @dangeRuss said in How many WTFs can you spot:

    Uhhh what? None of those are postal codes, plus we call them zip codes over here.

    Yes, actually, they are.

    We're talking about the two-letter state and territory name abbreviations used by USPS; the source code is quite obvious in that regard, and what I call them should be almost entirely irrelevant. You're arguing :pendant:ry here for no real reason.



  • @Fox said in How many WTFs can you spot:

    You're arguing :pendant:ry here for no real reason.

    YMBNH



  • @Fox said in How many WTFs can you spot:

    @dangeRuss said in How many WTFs can you spot:

    Uhhh what? None of those are postal codes, plus we call them zip codes over here.

    Yes, actually, they are.

    We're talking about the two-letter state and territory name abbreviations used by USPS; the source code is quite obvious in that regard, and what I call them should be almost entirely irrelevant. You're arguing :pendant:ry here for no real reason.

    TIL. I thought postal code is foreigner speak for zip code. Like doesn't canada have postal codes instead of zip codes?



  • @dangeRuss Something like that:

    0_1489176357693_upload-b4b92a07-c66b-45b0-9d8d-d425cf54171a


  • Winner of the 2016 Presidential Election

    @dangeRuss said in How many WTFs can you spot:

    @Fox said in How many WTFs can you spot:

    As an added bonus, three non-state postal codes are included. Washington, D.C. merited one, presumably because it's pretty damn close to New Jersey, Puerto Rico, probably because it's one of the larger territories and it's kind of sort of close to New Jersey? and... the Virgin Islands... because... uh... why? They barely have a six digit population. I guess that's why their number is outside of the somewhat-alphabetical-order system, whereas DC and PR take numeric precedence over actual states.

    Uhhh what? None of those are postal codes, plus we call them zip codes over here.

    I think you mean they included 3 non-states on the list, and while they're not technically states, they do usually go into the state field.

    I concur that the two-letter state code is not a postal code. Wikipedia seems to agree:


  • Discourse touched me in a no-no place

    @dangeRuss said in How many WTFs can you spot:

    Anyone?

    One :wtf:. Two :wtf:s. Three :wtf:s!

    Ha!
    Ha!
    Ha!


Log in to reply