JavaScript - Best Places To Learn Javascript?
I've managed to gain decent knowledge of HTML and CSS and am now looking into Javascript, I have been following the "beginner JavaScript tutorials" that TheNewBoston does on youtube, is this the best source or would you advise using http://www.w3schools.com/??? Any other websites?
Thanks Similar TutorialsI 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 I just know 2 sites below: http://devsnippets.com/ http://www.dynamicdrive.com/ Hello, I'm currently taking a JavaScript class at a local community college and my whole learning experience with it has been horrendous. I'm doing horrible in the class and the book we use is just beyond horrible. The book we use is called JavaScript and ajax 2nd edition. The first assignment we had to do had us putting an array in a function. Other programming classes uses books that start out slow this one just jumps right into it and is all disorganized. I have taken Java and Python and passed both classes with a B but for some reason I'm struggling really bad in this class. I wanted to be a web developer but I feel like it's slowly fading away because of the difficulty of the course. What are some better ways I can learn JavaScript? I have heard of code academy, tree house, and code school and tried code academy but I felt like it was just mainly copying code and I want to get more out of it. How did you guys learn JavaScript..Was it self taught or through school? I really thought that JavaScript would be easier than learning java and python but I feel like it's not. Thanks for your help..I need some words of encouragement. lol
I am just a beginner..can u please suggest me how to learn it properly..any book(must not be lengthy and complicated) or document.
Hi, I am using a tooltip that uses the following javascript Code: <script type="text/javascript"> $(document).ready(function() { //Tooltips $(".tip_trigger").hover(function(){ tip = $(this).find('.tip'); tip.show(); //Show tooltip }, function() { tip.hide(); //Hide tooltip }).mousemove(function(e) { var mousex = e.pageX - 90; //Get X coodrinates var mousey = e.pageY - 400; //Get Y coordinates var tipWidth = tip.width(); //Find width of tooltip var tipHeight = tip.height(); //Find height of tooltip //Distance of element from the right edge of viewport var tipVisX = $(window).width() - (mousex + tipWidth); //Distance of element from the bottom of viewport var tipVisY = $(window).height() - (mousey + tipHeight); if ( tipVisX < 90 ) { //If tooltip exceeds the X coordinate of viewport mousex = e.pageX - tipWidth - 90; } if ( tipVisY < 90 ) { //If tooltip exceeds the Y coordinate of viewport mousey = e.pageY - tipHeight - 90; } //Absolute position the tooltip according to mouse position tip.css({ top: mousey, left: mousex }); }); }); </script> As you can see I have set its X position at -90 and y position at -400 so that It could be displaying well when the mouse is hover over a link and it do appear well in the testing page http://bloghutsbeta.blogspot.com/201...slidernav.html If you put your mouse over ALEX in 'A' category BUT from the same test site but in different location from above here http://bloghutsbeta.blogspot.com/201...ting-main.html if you put your mouse over ALEX under 'SIMULATION' category then you will see that the tooltip is way down. Not even that the tooltip moves away if the screen resolution changes. I changed value again and again but didn't reach any conclusion, can someone help me with this issue as what to do to fix it? Note: If you require a complete markup please let me know in comment, I considered it not required that's why I didn't added it to my post ^^ Hi this is on my midterm review and I got the program down easily but I just wanted to know if there was an easy way of shortening down the answer to only 2 decimal places.possibly through division? Code: import java.util.*; public class StockSale { public static void main(String[] args) { Scanner input = new Scanner(System.in); double stockSale; // represent the stock sale price double commission; System.out.print("Please enter a the stock value price: "); stockSale = input.nextDouble(); if(stockSale < 100.00) commission = 20.00; else if (stockSale <= 999.99) commission = (20.00 + ((stockSale - 99.99)*.01)); else if (stockSale <= 9999.99) commission = (30.00 + ((stockSale - 999.99)*.005)); else if (stockSale <= 99999.99) commission = (75.00 + (( stockSale - 9999.99)*.0025)); else commission = ( 150.00 + ((stockSale - 99999.99)*.0015)); System.out.print("The commission on this stock sale is $" + commission ); } } i appreciate any help given thanks Hi.. I have javascript code with computation, but I have problem in my result because it was not round off or fixed into two decimal places only. here is my code: Code: <script type="text/javascript"> function test_(cmpd) { var len_ = (document.frmMain.elements.length) - 1; for (i=0; i <= len_; i++ ) { var strPos_ = document.frmMain.elements[i].id.indexOf(cmpd) if (strPos_ != -1) { var strPos = document.frmMain.elements[i].id.indexOf("_"); var strId = document.frmMain.elements[i].id.slice(strPos + 1) + "_" + document.frmMain.elements[i].id.slice(0,strPos) // this is the computation that I need to fixed the result into two decimal places document.frmMain.elements[i].value = document.getElementById(strId).value * document.getElementById('mult').value; } } } </script> Thank you so much Hi , I am very new to HTML,CSS,Javascript coding. I have to add some check box in the page and there are multiple tabs in the same single page. If I select or deselect any check box, checkbox checks from all the places should be changed. Can anybody tell me how to do so using HTML,CSS, Javascript? Hey everyone. I am looking to enforce the use of 3 decimal places in an input. I have found some scripts that do this, however, I also want to format it this way in case someone enters LESS than 3 decimal places. If a user enters 1.25, I want it formatted as 1.250 If a user enters 1 I want it formatted as 1.000 etc. Possible? Not sure where to start. I'm fairly new to programming, I just started JavaScript and I did read the rules. I am a student and will not post my code asking someone to do my homework. I just need a little guidance. For my assignment, when a webpage is loaded, it prompts the user to enter hours worked, their pay rate and tax rate, then use a function to calculate the net weekly pay, then display all numbers on the screen. Now I have this working and it appears on the screen, but I need to limit the hours worked to a whole number and the pay and tax rates need to only show 2 digits on either side of the decimal. From searching I found a lot of information about ParceInt, ParceFloat and toFixed, but cannot get these to work. Either these are not correct or I'm not using them correctly. Below are samples of 2 of the prompts. Can someone help me with this problem? Also is it better the handle this problem at the prompt or in the function or where it writes to the screen? Code: var hours_worked = prompt ("How many hours did you work?", ""); parseInt(hours_worked); var pay_rate = prompt ("What is your pay rate?", ""); parseFloat(pay_rate); Hopefully the subject was good enough and the content descriptive to understand when I'm trying to accomplish. Brian Hi, I'm really new to Javascript. Recently in my IT class, we made a HTML page which would open a popup box, where the user could enter a key word. When the user pressed enter, the page would navigate to a specific page. The code we used was: Code: <script language = "JavaScript"> where = window.prompt ("Please tell me where you would like to go."); switch (where){ case "Digg" : window.location = "http://www.digg.com" ; break; default: window.location = "http://www.google.com" ; } </script> What I am hopeing to do, is implement this code on my workplaces server, and have the keywords link to other html documents within the server. However when I tested this, for some reason the links are not working. Can this actually be done? Am I missing something silly? Are there any other ways of doing this? Thanks in advance Hello! I have wanted to learn JS/PHP/MySQL for like six-seven years and I have in periods quitted and started with HTML/CSS because I always find CSS as an obstacle. I am a perfectionist, so I want everything to be perfect and I get frustrated when I don't know when to use %, px, em, when to use bla and bla.. And besides, I suck at design. I don't have an eye for that. I just want to get started with the fun stuff - get some interaction with the user. Can I start learning JS without really mastering CSS and then hopefully get back to CSS afterwards? And would I want to learn JS or jQuery at first? Thanks! Hi guys I'm new to the forums here. I want to learn how to use Javascript and AJAX along with jquery or prototype to develop a dynamic website. For example, I like how www.dropbox.com works. Everything has a transition, and you can drag and drop things around which is what I like. Ultimately I hope to be able to develop a dynamic website with social networking elements. I know my goals are lofty, but where should I get started and what should I learn. I have some cursory programming experience with visual basic, fortran and html. Any particular books that would help me learn. Ideally a book would have some programming "challenges" or small projects that would give me some experience. Thanks I want to get started in javascript, and while I can do html, some dhtml, and learned (and forgot) cobol, assembly and fortran, I'm not 'getting' it. so I thought if I could start with something I want to do, and see the script for it, rather than figure out what other scripts are doing, that might work better. Suppose I wanted to start at a fixed number, and count up by a randomized +1 or +2 every 12 hours, from now till forever, and display the resultant number. If starting with <script language="javascript"> Countup(); </script> What next? Hi Java is becoming big. Can I ask what is the best resources to learn java besides lynda.com? Thanks. R I'm trynna make a website, its gonna be like, a game making website I plan to keep it as simple as possible for now, but once I get better at it.. anyways, I'm trying to figure out how I would do things such as: click, drag and drop right click, select something and make it appear on screen make something happen on keydown events Hi! I'm just starting to learn java script and have a questions. If anyone could answer this it'd be great. When preloading images for use in things like mouseout/on/etc what is the proper code? var image1, image 2; image1 = new Image() image1.src = "" image2 = new Image() image2.src = "" OR var image1 image1.... var image2 image2.... The book I have list both but only the 2nd way I listed works. Why? Thanks Good Afternoon!!! I am writing a script that needs to show the evaluation as 2 decimal places as well as containing the comma (as in a currency format). It should be as simple as possible. Below is my current code: <html> <script language="javascript"> //function that checks the value of text boxes and radio buttons function checkit(){ while(document.form2.text1.value=="" || document.form2.text2.value=="" || document.form2.r1[0].checked!=true && document.form2.r1[1].checked!=true && document.form2.r1[2].checked!=true && document.form2.r1[3].checked!=true) { if(document.form2.text1.value=="") { alert("You did not enter a value in the first text field"); a=confirm("Click ok to continue. Click cancel to exit") if(a==false) { break; } } if((document.form2.r1[0].checked!=true)&&(document.form2.r1[1].checked!=true) &&(document.form2.r1[2].checked!=true)&&(document.form2.r1[3].checked!=true)) { alert("You did not select a mathematical operator"); a=confirm("Click ok to continue. Click cancel to exit") if(a==false) { break; } } if(document.form2.text2.value=="") { alert("You did not enter a value in the second text box"); a=confirm("Click ok to continue. Click cancel to exit") if(a==false) { break; } } } } //function calculates value of text boxes function evalit(){ var a = eval(document.form2.text1.value) var b = eval(document.form2.text2.value) if(document.form2.r1[0].checked==true) { document.form2.text3.value=eval(a+b) } if(document.form2.r1[1].checked==true) { document.form2.text3.value=eval(a-b) } if(document.form2.r1[2].checked==true) { document.form2.text3.value=eval(a*b) } if(document.form2.r1[3].checked==true) { document.form2.text3.value=eval(a/b) } } </script> <!--calculate--!> <form name=form2> Enter a number in the first text box<br> Select a mathematical operation<br> Enter a value in the second text box<br> Push the "=" button<br> The answer should appear in the third text box<br> The result MUST have 2 digits after the decimal point and <br> if the number is big enough, include the commas for thousands, millions, billions, etc.<br> <table border=1> <tr> <td><input type="text" name="text1"></td> <td><input type="radio" name="r1" value="+">+<br> <input type="radio" name="r1" value="-">-<br> <input type="radio" name="r1" value="*">*<br> <input type="radio" name="r1" value="/">/<br></td> <td><input type="text" name="text2"</td> <td valign=middle><input type="button" value="=" onClick="checkit(); evalit()"> </td> <td><input type="text" name="text3"</td> </tr> </table> </form> </html> Any assistance would be appreciated. Thank you!!! 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 |