JavaScript - Where Can I Learn Some Basics Of Java Programming?
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 Similar TutorialsHi Java is becoming big. Can I ask what is the best resources to learn java besides lynda.com? Thanks. R I am trying to create a form where you are able to calculate what a total car cost would be based on a 6.25% of the CarAmount. Then I would like to be able to add $125 that with is TitleProcess and then $99 to that which is the LicenseFee. Right now I have not been able to get the tax to work on this code. If someone could get this all to work that would be great, or else even if you program your own code. Thank you so much! <form action="POST" name="myform"> <table border="1" bgcolor="#006666"> <tr> <td align="center" colspan="2"> <script language="JavaScript"><!-- function CarLoanCalculator() { form = document.myform CarAmount= form.CarAmount.value DownPayment= "0" AnnualInterestRate = 625/100 TitleProcess= 125 MonthRate=AnnualInterestRate/12 NumPayments=TitleProcess*12 Prin=CarAmount-DownPayment MonthPayment=Math.floor((CarAmount*AnnualInterestRate)+TitleProcess)) form.NumberOfPayments.value=NumPayments form.MonthlyPayment.value=MonthPayment } // --></script> <font color="#FFFFFF" size="2" face="arial narrow"><b>Car Loan Calculator</b> <br> Enter Your Details & Click the Calculate Button</font></td> </tr> <tr> <td> <table border="0" cellpadding="2"> <tr> <td align="right"><font color="#FFFFFF" size="2" face="arial narrow">Car Loan Amount $ </font></td> <td><font color="#FFFFFF" size="2" face="arial narrow"> <input type="text" size="10" name="CarAmount" value="" onBlur="CarLoanCalculator()" onChange="CarLoanCalculator()"> <br> </font></td> </tr> <tr> <td align="right"><font color="#FFFFFF" size="2" face="arial narrow">Annual Interest Rate </font></td> <td><font color="#FFFFFF" size="2" face="arial narrow"> <input type="text" size="3" name="InterestRate" value="6.25" onBlur="CarLoanCalculator()" onChange="CarLoanCalculator()"> % <br> </font></td> </tr> <tr> <td align="right"><font color="#FFFFFF" size="2" face="arial narrow">Term of Car Loan </font></td> <td><font color="#FFFFFF" size="2" face="arial narrow"> <input type="text" size="3" name="NumberOfTitleProcess" value="125" onBlur="CarLoanCalculator()" onChange="CarLoanCalculator()"> TitleProcess<br> </font></td> <td><font color="#FFFFFF" size="2" face="arial narrow"> <input type="button" name="morgcal" value="Calculate" language="JavaScript" onClick="CarLoanCalculator()"> </font></td> </tr> <tr> <td colspan="3"><font color="#FFFFFF"></font></td> </tr> </table> </td> </tr> <tr> <td> <table border="0" cellpadding="2"> <tr> <td align="right"><font color="#FFFFFF" size="2" face="arial narrow"> Number of Car Payments </font></td> <td><font color="#FFFFFF" size="2" face="arial narrow"> <input type="text" size="7" name="NumberOfPayments"> <br> </font></td> </tr> <tr> <td align="right"><font color="#FFFFFF" size="2" face="arial narrow">Monthly Payment $ </font></td> <td><font color="#FFFFFF" size="2" face="arial narrow"> <input type="text" size="7" name="MonthlyPayment"> <br> </font></td> </tr> <tr> <td align="center" colspan="2"> </td> </tr> </table> </td> </tr> </table> <div align="center"></div> </form> I am a total noob to JS and need a little help. Currently writing some small snippets to control iTunes. An example: Code: var iTunesApp = WScript.CreateObject("iTunes.Application"); iTunesApp.LibraryPlaylist.AddFile('B:\\filetoadd.mp4'); Nicely adds a file to the library. Now, i need to set the encoder. I try this: Code: var iTunesApp = WScript.CreateObject("iTunes.Application"); iTunesApp.CurrentEncoder("MP3"); I get: object doesn't support this property of method. iTunes SDK docs: HRESULT IiTunes::CurrentEncoder ( [in] IITEncoder * iEncoder ) Sets the current encoder (AAC, MP3, AIFF, WAV, etc.). Parameters: iEncoder An IITEncoder object corresponding to the new encoder. Any ideas? Hello all, This is my first post here, so I apologize if I didn't format this correctly. I am trying to figure out where I went wrong in my code. The objective is to display all lines of the song using a switch statement. I thought I had my head wrapped around it, but apparently not. Would anyone mind pointing me in the right direction, or telling me what I did wrong here? I would be greatly appreciative! Thank you for your consideration folks. Code: <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Excercise 8.11</title> <script type = "text/javascript"> for (var day = 1; day <=5; day++) { switch (day) { case 1: document.write("On the "+day+"st of Christmas, my true love gave to me, A partridge in a pear tree."); case 2: doucment.write("On the "+day+"th day of Christmas, my true love gave to me, Two turtle doves,<br>"); case 3: document.write("On the "+day+"th day of Christmas, my true love gave to me, Three French hens,<br>"); case 4: document.write("On the "+day+"th day of Christmas, my true love gave to me, Four calling birds,<br>"); case 5: document.write("On the "+day+"th day of Christmas, my true love gave to me, Five golden rings,<br>"); break; } } </script> </head> <body> </body> </html> 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! 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
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 just know 2 sites below: http://devsnippets.com/ http://www.dynamicdrive.com/ Hi I recently started researching about programming and was interested right away. I'm new to all this and need a place to start. Any help would be greatly appreciated and look forward to posting on this forum. 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.
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 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? Im having a problem with my Android applet I am creating using a program called Eclipse It reads the error: 'The method onCreateOptionsMenu(Menu) in the type Activity is not applicable for the arguments (Menu)'. Here is what I have written: [code] public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); MenuInflater awesome = getMenuInflater(); awesome.inflate(R.menu.main_menu, menu); return true; } [code] IndyNS I am trying to create a dynamic form on my webpage. What I want to do is repeat this process multiple times on the same page. I know I have to have unique id's but I am not for sure how to set them. // JavaScript Document function addRowToTable(){ var tbl = document.getElementById('Division'); var lastRow = tbl.rows.length; // if there's no header row in the table, then iteration = lastRow + 1 var iteration = lastRow; // var iteration = lastRow + 1; var row = tbl.insertRow(lastRow); // cell 0 var cell0 = row.insertCell(0); var el = document.createElement('input'); el.type = 'text'; el.NAME = 'Resource[]'; el.size = 30; cell0.appendChild(el); //cell 1 var cell1 = row.insertCell(1); var el = document.createElement("select"); cell1.innerHTML + '<option value="0">Avaliable</option>' + '<option value="1">Busy</option>' //cell 2 var cell2 = row.insertCell(2); var el = document.createElement('input'); el.type = 'text'; el.NAME = 'Comment[]'; el.size = 25; cell2.appendChild(el); } hi every one i;m new here and i love to know programming languages and some friends adviced me to start with java script then php , and i guess i'm at the right place can you please tell how to start and where to begain i'm really don't know anything about programming
Problem: When I click the compute button, it does not do anything. It does not go to function CALCULATE and do its stuff . Please help me. This is my PHP code. Code: echo "<table border=1>"; while($row_contestant<$numrows_criteria) { $CId=mysql_result($result_contestants,$row_contestant,"CId"); $CName=mysql_result($result_contestants,$row_contestant,"CName"); echo "<tr><td width = '10'>$CId</td><td>$CName</td>"; for($start2 = 1;$start2 <= $counter;$start2++) { echo "<td><input type = 'text' name = 'cr[]' value = ''></td>"; } $row_contestant++; echo "<td><input type = 'text' name = 'rating' value = ''></td><td><input type = 'Button' name = 'getAvg' value = 'compute' onClick = calculate()></td></tr>"; } echo "</table> <p>"; } This is my Javascript calculate function code Code: function calculate() { sum = 0; for(i = 0;i<=Number(document.frmOne.counter.value);i++) { sum = sum + Number(document.frmOne.cr[i].value) } document.frmOne.rating.value = sum } The output: Any help would be highly appreciated. God Bless. Hello all, I am having some trouble getting my Javascript code to work properly. I want to create a program that allows two objects to race to a certain point which is 1000px in my program. I have figured out how to get the images to race at random speed, and I have figured out a function to reset the program if the user chooses to restart. Basically I can't figure out how to get the clearTimeout() to stop the Race() function when it reaches 1000px. I am fairly new to the Javascript world and could really use some suggestions or a point in the right direction. Thanks in advance, AJ. Here is my program so far: <body> <script language="JavaScript" type="text/javascript"> <!-- function StartUp() { if ((car1.style.pixelLeft<1000) && (car2.style.pixelLeft<1000)) { Race(); } else { alert(); } } function Race() { car1.style.pixelLeft+=(Math.floor(Math.random()*11)); car2.style.pixelLeft+=(Math.floor(Math.random()*11)); stop=setTimeout("Race()",50); } function Restart() { clearTimeout(stop); car1.style.pixelLeft=10; car2.style.pixelLeft=10; } function swapImage() { var image = document.getElementById("imageToSwap"); var length = document.getElementById("Road"); image.src = Road.value; } //--> </script> <div id="car1" style="position:absolute; top: 10"> <img src="Car1.gif" alt=""/> </div> <div id="car2" style="position:absolute; top: 75"> <img src="Car2.gif" alt=""/> </div> <img id="imageToSwap" src="Road1000.gif" alt=""/> <form name="form1"> <br> <input type="button" value="Race" onClick="StartUp()"> <input type="button" value="Restart" onClick="Restart()"> <br> Track Length: <select id="Road" name="Road" onChange="swapImage()"> <option value="Road1000.gif">1000 feet</option> <option value="Road750.gif">750 feet</option> <option value="Road500.gif">500 feet</option> <option value="Road250.gif">250 feet</option> </select> </form> </body> I have written my application by specifying all dimensions in pixels. If used on a monitor with less resolution, it causes the screen to have to scroll left or right. However, it seems to be the same top to bottom. In any event, I was wondering if there is a way to specify pixels maybe through a function or something, where the client's monitor resolution can be detected, and then, if I specify a size as 100px, I can change that to something like pixCount(100). Greeting Everyone, Can anyone breakdown the differences between programming languages in VERY VERY BASIC plain English? (i.e. HTML use for website format, CSS used for the graphics on the webpage) Here's what I have questions about: 1. Differences between the most commonly used programming languages for software/web development (Javascript, Ruby on Rails, Phyton, etc.). 2. How do you determine which programming languages to use? 3. What factors are considered? Thank in advance for the people that reply. =) |