JavaScript - Language Patch
I need to program a language protocol compatibility patch for multiple OS'. I don't know where to start, I'm new to programming BUT at least I know what is needed. If anyone is willing to help, I'm willing to elaborate.
Similar TutorialsHello, I would like to add multi-language support on the website. So far i have the following code which enables a drop down menu. I would rather prefer a flags instead of a drop down menu. Please help. Thank you very much. PHP Code: <div id="google_translate_element" class="right"></div> <script> function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en', includedLanguages: 'en,fr,de,it,es', gaTrack: true, gaId: 'UA-28770952-1', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL }, 'google_translate_element'); } </script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> I'm currently using an automation software to automate a series of steps I perform on my computer. One of the tasks involves hundreds of If/Then loops, extracts text from websites using an embedded web browser, computes equations and write text files. The thing is, in order to share this with somebody else, they also need the same automation software installed, and then need to import it. So it's a process I'm trying to replace by creating a small program with a GUI that involves a simple installation on the user's PC (or ideally without installation). The language must be flexible enough to perform the same actions that I listed above - and more preferably. I'm a complete novice with anything besides HTML/CSS so I'm looking for A flexible programming language that isn't rocket science to learn from scratch and is ideal for small stand-alone programs The ability to create a GUI. I'd be happy to read any good reference you have about the language/design knowledge needed for GUI's. Thanks in advance Hi Guys , This is the urgnt requirement , I want to change the Browsers setting languge through java script ,and according to it , The data wht I enter dhould be change .Thanks In advance Any one have any idea how to make a Java scorecard... If any one have code than please send me i have to submit it on my project... please help mee...
Hey everyone I just signed up to this forum. I have been doing a cert IV in Networking IT and part of my course involves javascript. Its all pretty simple, but we dont really have a teacher who I can ask questions. Im have a dead line tonight for a heap of work and I just keep running into so many problems. They are all pretty simple, but I just am at the end of my thread (no pun intended). At the moment Im just working on a box form, and I keep getting object expected errors in relation to my onClick and undefined with my elements. Code: <head> <meta name="author" content= "5h!fTyLiV3z" /> <title>Pay Rate Calculater</title> <SCRIPT LANGUAGE="JavaScript"> function calulatePay() { var elements; var rate = eval(document.payForm.elements[0].value); var hours = eval(document.payForm.elements[1].value); var prod = rate * hours; if (isNaN(element[counter].value) || (element[counter].value == "") ) { if (hours >= 20) { alert("You earned $" + (prod+(hours*2)) + " in " + hours + " hours.") } else { alert("You earned $" + prod + " in " + hours + " hours.") } } else { alert ("Enter numbers please"); } } </SCRIPT> </head> <body> <FORM onSubmit="" NAME="payForm"> <CENTER> <TABLE ALIGN="CENTER" BGCOLOR="#888888" BORDER="3" CELLPADDING="5"> <TR> <TD BGCOLOR="#004080"> <FONT COLOR="#ffffff" FACE="Arial"><B>Calculate My Weekly Pay</B></FONT> </TD> </TR> <TR> <TD> <CENTER> $ <INPUT TYPE="number" NAME="rate" SIZE="11" MAXLENGTH="8" VALUE="Enter pay rate"> : <INPUT TYPE="number" NAME="hours" SIZE="16" MAXLENGTH="8" VALUE="Enter hours worked"> <INPUT TYPE="button" VALUE="Calculate" onClick='calulatePay()'> </CENTER> </TD> </TR> </TABLE> </CENTER> </FORM> </body> I know its all a bit sloppy, but Im just trying to rush though so much work... Any help would be great. If everyone is active tonight I probably will be. Normally I dont have this many problems, but I guess its just exam pressure... Cheers 5hifty I would like to ask people's opinions as to which "offline" language is most similar to javascript? I don't program for a living, but I have been learning javascript in my spare time. I would now like to have a shot at making a desktop application, and I think it would help to choose one which is most similar, if at all possible, to javascript? e.g. python, ruby, C#, visual basic ... I have no idea and haven't had much luck googling this Thanks Matt Hi Folks, I'm developing a software tool that can create the basic software outline (classes, modules, functions) from natural language. (The problem definition document for example) The benefits of a initial software structure are an enhanced software performance, and a greater adaptability later on. I was wondering for what purposes this tool would be interesting? And if an integrating this with a programming language would be interesting, so a pre-programmed code divided over several classes emerges. Best regards, viaBox -=-=-=-=-=-=-=-=-=-=-=-=-=-=- http://budurl.com/ViaBox =-=-=-=-=-=-=-=-=-=-=-=-=-=-= I want to have a browser language detection for 2 languages for Explorer and Firefox and struggle a little to make it work. I don't know really much about JavaScript so I guess I did some grave errors. It works for one language though, but for that I don't really detection. I am not sure if that's wrong, but I try to look for the 'en-' in the language not to deal separately with en-US, en-AU, en-UK etc. PHP Code: <script type="text/javascript"> var str=navigator.language; x = (str.search(/en-/i)); if ( !(x=='-1') ) { document.write("English Mozilla"); } var expl=navigator.browserLanguage; ex = (expl.search(/en-/i)); if ( !(ex=='-1') ) { document.write("Englisch1 Explorer"); } var dm=navigator.language; d1 = (dm.search(/de-/i)); if ( !(d1=='-1') ) { document.write("German Mozilla"); } var dex=navigator.browserLanguage; dexpl = (dex.search(/de-/i)); if ( !(dexpl=='-1') ) { document.write("German Explorer"); } </script> I am not super familiar with code - I can easily take code and with a little direction get the desired end result so anyone who can help me with this it will be VERY appreciated. I don't even know what terms to search in order to create a page that I am looking for.... So here goes: I want to model our distributor page after a R E D K E N.com Distributor Locator Page. Here is what happens.... There is a drop down menu of the 50 states, and when you select the state the table of information below changes. screen shots below I am sure this is fairly easy to resolve, however I don't know where to begin. Thank You in advance for your time. Kristi Hi, I'm currently trying to get javascript to work with internet explorer. I managed to get one part of the translation file to work. It's a javascript to change some of the words on Facebook from English to Secwepemc (native american language). The original file works in Firefox and Chrome but not in safari. I knew it was because internet explorer has its own parameters. A file works completely for FF and chrome but not for IE. So, I changed the language a bit so that IE can understand it. Now I have one part of the translation working but not the others. I am wondering if it would be better to use ID's, names, and class all together to get the english words I want to change. I am using grease monkey for IE to use this script. I know firefox and chrome are much better but the plan is for everyone to use and some people still use IE. I know that if I have part of the words translating, then it must be the wrong identifiers. If someone can either help me find the right identifiers or if I missed changing syntax from FF and Chrome to IE, that would be amazing! Here is the javascript file. Code: var es = new Array(); es["Home"] = "Tsitcw"; es["News Feed"] = "Lexeyem"; es["Friends"] = "Kweselkten"; es["Like"] = "Xwexwisten"; es[" likes this."] = " r xwexwistes."; es["Today"] = "Pyin Te Sitqt"; es["Say hello."] = "Say weytk."; es["Say hi."] = "Say weytk."; es["Tomorrow"] = "Pexweyt"; es["What are you planning?"] = "Me7 Stemi ke7 tsuwet?"; es["Where?"] = "T'he7en"; es["Who's invited?"] = "Sweti7?"; es["What's on your mind?"] = "Stemi ke7 peti'nesme?"; function loadSecwepemc() { var fbelem = document.getElementsByTagName('a'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; } } var fbelem = document.getElementsByTagName('span'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; } } var fbelem = document.getElementsByClassName('ego_social_context'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; } } var fbelem = document.getElementsByTagName('input'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.getAttribute('placeholder') in es) { thisElem.setAttribute('placeholder',es[thisElem.getAttribute('placeholder')]); } if (thisElem.getAttribute('value') in es) { thisElem.setAttribute('value',es[thisElem.getAttribute('value')]); } } var fbelem = document.getElementsByTagName('textarea'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.getAttribute('placeholder') in es) { thisElem.setAttribute('placeholder',es[thisElem.getAttribute('placeholder')]); } if (thisElem.getAttribute('title') in es) { thisElem.setAttribute('title',es[thisElem.getAttribute('title')]); } if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; } } var fbelem = document.getElementsByTagName('h3'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; thisElem.attachEvent( "onClick", loadSecwepemc()); // capture phase } } var fbelem = document.getElementsByTagName('h2'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { icon = thisElem.childNodes[0] thisElem.innerText = es[thisElem.innerText]; thisElem.appendChild(icon) } } } loadSecwepemc(); function changedNode(e) { var fbelem = e.target.getElementsByTagName('a'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; } } var fbelem = e.target.getElementsByTagName('span'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; thisElem.attachEvent( "onLoad", loadSecwepemc()); // capture phase } } var fbelem = e.target.getElementsByClassName('ego_social_context'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; } } var fbelem = e.target.getElementsByTagName('input'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.getAttribute('placeholder') in es) { thisElem.setAttribute('placeholder',es[thisElem.getAttribute('placeholder')]); } if (thisElem.getAttribute('value') in es) { thisElem.setAttribute('value',es[thisElem.getAttribute('value')]); } } var fbelem = document.getElementsByTagName('textarea'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.getAttribute('placeholder') in es) { thisElem.setAttribute('placeholder',es[thisElem.getAttribute('placeholder')]); } if (thisElem.getAttribute('title') in es) { thisElem.setAttribute('title',es[thisElem.getAttribute('title')]); } if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; } } var fbelem = e.target.getElementsByTagName('h3'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { thisElem.innerText = es[thisElem.innerText]; thisElem.attachEvent( "onClick", loadSecwepemc()); // capture phase } } var fbelem = e.target.getElementsByTagName('h2'); for (var i = 0; i < fbelem.length; i++) { var thisElem = fbelem[i]; if (thisElem.innerText in es) { icon = thisElem.childNodes[0] thisElem.innerText = es[thisElem.innerText]; thisElem.appendChild(icon) } } } document.attachEvent('onNodeInserted', changedNode()); |