Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how old are you

Posted on 2011-02-24
6
Medium Priority
?
374 Views
Last Modified: 2012-05-11
     Hallo,
      
      
      
      the code should give how old someone is but it doesent work i have done everything i know
      
      Thanks
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<title>Ahmadi Mohsen oefening 3</title>
	</head>
	<body>
		
		<script type="text/javascript">
		name = prompt("your last name");
		
		document.write( "Welkom " + name );
        </script>
		
		<script type="text/javascript">
		fname = prompt("your first name");
		yeardate = parseInt (prompt("geef uw geboortedatum"));
		year= 2010-yeardate
		alert(fname + " you are " + year + " years!"  );
		
		
		</script>

	</body>
	

</html>

Open in new window

0
Comment
Question by:kensy11
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 10

Accepted Solution

by:
aboo_s earned 1500 total points
ID: 34969016
Well I tried your code and it told how old I am !

What seems to be the problem!?
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 34969030
i am getting the correct output here

Which browser are you trying with and what is the expected output?
0
 

Author Comment

by:kensy11
ID: 34969092
ooh im sorry i got it wrong but thanks
0
 
LVL 47

Expert Comment

by:for_yan
ID: 34969144
It actually works.
I copied it into file with .html extension (attachemnt)
if you open it in
the browser (or just save it and double-click on your PC) it asks name, last name and age and then determines
the date of birth
try.html
0
 
LVL 10

Expert Comment

by:aboo_s
ID: 34976834
This guy had me check his code and confirm it's working and then just take off with no points awarded!

This does not look too good!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question