# DHTML help~ (Newb)

**URL:** <https://forum.kirupa.com/t/dhtml-help-newb/295472>\
**Category:** web dev\
**Created:** [August 31, 2009, 4:20am UTC](https://forum.kirupa.com/t/dhtml-help-newb/295472 "2009-08-31T04:20:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DumbNub](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@DumbNub](https://forum.kirupa.com/u/DumbNub)\
**Post date:** [August 31, 2009, 4:20am UTC](https://forum.kirupa.com/t/dhtml-help-newb/295472/1 "2009-08-31T04:20:55Z")

</div>

Hello there!  
I’m kinda new to javascript and dhtml. If my question is moronic I’m sorry :hair: really trying!

Anyway, it goes like this…  
I want to make this prompt, it asks for your age, you put in a number, below 60 it says too young, above 60 but under 70 will say something like “wow your (age)!?” and if your over 70 it will change the html on the page.

heres my script. I got the things working, just when i change html i fail-dozer…

> 

\<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd)”\>  
\<html xmlns=“[XHTML namespace](http://www.w3.org/1999/xhtml)”\>  
\<head\>  
\<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” /\>  
\<title\>Not working -sad face-\</title\>

\<script type=“text/javascript”\>

var age = prompt(“Enter age:”, “”);

var isOverSixty = parseInt(age);

var d = document.getElementById(“thing”);

if ((age \> 60) && (age \< 70))  
{  
document.write("Your " + isOverSixty + “Wow!”);  
}  
if (age \> 70)

{  
document.write(“Your older then 70!!?? Really?!”);  
d.innerHTML = “\<h1\>Please work! \<em\>WORKING!\</em\> Huzzah!\</h1\>”;  
}  
if (age \< 60)  
{  
document.write(“Your too young!”);  
}

\</script\>  
\</head\>  
\<body\>

\<div\>  
\<h1 id=“thing”\>Here is my header\</h1\>  
\</div\>

\</body\>  
\</html\>

url to my page  
[http://www.okupinski.net/jsparactice/dhtml/agechangething.html](http://www.okupinski.net/jsparactice/dhtml/agechangething.html)

Thanks for any help. Again sorry if this is really stupid :emb:
