Solved

how old are you

Posted on 2011-02-24
6
368 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
6 Comments
 
LVL 10

Accepted Solution

by:
aboo_s earned 500 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:gurvinder372
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now