HTML - Age Calculation
hi i m new to programming i need a program for age calculation whch displays years months hours minutes , each must b displayed seperately, n the input method must b shown with examples like how to input the dates, ex dd/mm/yy
Enter your date of birth Month � Date� Year You have been living for: In months: In weeks: In days: In hours: In minutes: In seconds: In Milliseconds: Your next birthday will be in: and this program must b embeded in any website by users Similar TutorialsCould someone please tell me how to do the simplest of calculations on a webpage? Take in a few values - three or four only. Do some multiplying on them. Output the results to the page. I know it can't be done in html. I feel it is probably a javascript candidate. But how, exactly, to put the two together and do it? Sorry to be so dumb. We all gotta start somewhere. Hello, I worked very hard on creating this calculation form. Now I am trying to input some radio buttons (MALE/FEMALE). The formulas are different: MALE function formula(x,y){ return ((x+y-1)/12); FEMALE function formula(x,y){ return ((x+y+1)/12); Can someone please help me?? I gave up trying after 7 h. I can`t do this anymore, it seems impossible to me. <script type="text/javascript"> function $(el) { return document.getElementById(el); } function formula(x,y){ return ((x+y-1)/12); } function check() { var x=parseInt($('x').value); var y=parseInt($('y').value); if($('x').value.length>0 && $('y').value.length>0) { $('result').value=formula(x, y); } } </script> <table> <tr><td width="50%"><font face="arial" size="2" color="#FFCCFF"><b><input type="radio" name="male" value="male"checked>MALE</b></font></td> <td width="50%"><font face="arial" size="2" color="#FFCCFF"><b><input type="radio" name="female" value="female">FEMALE</b></font></td></tr> <tr><td> x:</td><td><input type="text" id="x" onclick="this.select()"/></td></tr> <tr> <td> y:</td><td><input type="text" id="y" onclick="this.select()"/></td></tr> <tr><td> Rezult <input name="button" type="button" onclick="check()" value="calculate" /></td><td><input id="result" type="text" disabled style="width:100px; height:40px; text-align:center; vertical-align:middle"/></td> <tr><td> </td> <tr> <td> </td> </table> </td> THANK YOU!!!!! Hey guys new here so thank you in advance for any help. I am building my first site and I want to have a form on it where users of the page can submit info into a form and then be provided info about that info. For example: How many A's do you want to buy? User inputs a number or selects from a drop down of numbers How many B's do you want to buy? User inputs a number or selects from a drop down of numbers Then I want to the user to see instant feedback on the site that says "Your total is $x.xx" Is this possible? Thanks again Hey guys! I'm working on a web page for a loan redemption calculation. I want people to enter the loan amount, the interest rate, and the monthly redemption rate. The program should tell them then how many month it takes to pay back the entire loan and how much accumulated interest they have to pay. I tried it with this loop : (interestRate , loan and redemption are defined before this loop) Code: monthCount = 0 begOfMonth = loan interest = 0 valueWithoutInterest = 0 endOfMonth = 1 accInterest = 0 for(i=1;endOfMonth>0;i++){ interest = begOfMonth * interestRate / 1200 accInterest = accInterest + interest valueWithoutInterest = begOfMonth + interest endOfMonth = valueWithoutInterest - redemption begOfMonth = endOfMonth monthCount = i } document.getElementById("resLoan").innerHTML = loan document.getElementById("resInterest").innerHTML = interestRate document.getElementById("resRedRate").innerHTML = redemption document.getElementById("resIntPayed").innerHTML = accInterest document.getElementById("resRuntime").innerHTML = monthCount for some reason, this loop is infinite. When i modify the loop to calculate only 1 month, the numbers are correct. When i let it calculate 2 month, the accInterest explodes to a completely wrong value. I checked it so many times and i just cant find any mistake... I hope one of you guys can help me. thanks in advance! ps: sorry for the grammar Hello All, I am new to this, and not sure if this is the right forum. But, I have a simple web page with drop down menus where I can put values for a calculation. I would like to have the values saved as an input file for a python script that resides on the server. I would like the input file to be created and then the script executed and the output appear as a new page. I have googled this and have come up empty. Can someone point me in the right direction. Thanks, Bryan |