-
-
Recent Posts
- Html Dog Background
- Html Alt Images
- Html White Space Css
- Html Links Hover
- Html Animation Codes Icons
- The Ultimate Html Reference Pdf
- Html Heart Character Code
- Html Quizzes Codes
- Html Background Tags Web Page
- Html Documents Web Page
- Html Anchor Links Target
- Html And Css Codes Tutorial
- Html Goodies
- Html Font Colors Code
- Html Color Codes And Names
-
Tags
ajax audio blog bookmarks button cheatsheet color community css del.icio.us delicious design flash fonts forms free generator graphics icons Important Links inspiration javascript layout mp3 music myspace photo photography photos programming reference sharing social software templates tips tools tutorial tutorials typography video web web2.0 webdesign xhtml
Html Comment Box Script
By admin http://www.htmlexamples.net/html-comment-box-script/
html form not working with javascript function?
I built this code myself its suppost to take a user input value and run the function and spit the number back out but every time I try and run it I get a error code from line 40 (IE6), saying that the object does not support that atribute, but I know it does. I numbered the lines at the comment boxes.
function:
form:
I just want to know why its not working and what I can do to fix it.
the value property of a text box is valid, but i suspect lvltoget is not referencing the textbox properly with this code.
my advise -
then, in your function, use the getElementById method to get your object.first, use an ID attribute in place of or in addition to the name attribute for your textbox:
var lvltoget = document .getElementById(“lvltoget”) .value
lastly i would use a for loop instead.
for (var lvl = 2; lvl < lvltoget; lvl++)
{
...
cost += (lvl*1000)
}
Facebook HTML Box