For some reason getElementById continues to tell me that it had grabbed a null value despite any value I input. I am using firefox 3.6.8. Am I doing something wrong here?
[CODE]
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title> fibonacci sequence </title>
<meta http-equiv=”content-type”
content=”text/html;charset=utf-8″ />
<meta http-equiv=”Content-Style-Type” content=”text/css” />
<script type = “text/javascript”>
<!–
var valueInput = document.getElementById(“giggles”);
var prev = 0;
var holder = 0;
var current = 0;
while (current <= valueInput )
{
holder = current;
current += prev;
prev = holder;
if (current < 1)
{
current += 1;
}
}
alert(“The ” + valueInput.value + ” value within the fibonacci sequence is ” + current + “!”);
// –>
</script>
</head>
<body>
<body>
<form id = “fibonacciForm” method =”post” action = “index2.html”>
<p>
<label><b> Enter a value: </b><br />
<input name=”giggles” id=”giggles” type=”text” size =”20″ />
</label>
</p>
<p>
<input type=”submit” value=”Submit” />
<input type=”reset” value=”Reset” />
</p>
</form>
</body>
</html>