This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes my java script is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "my java script is not working " Watch "my java script is not working " New topic
Author

my java script is not working

raj talatam
Ranch Hand

Joined: Apr 19, 2012
Posts: 87


[Added code tags - see UseCodeTags for details]
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4366
    
    8

When you say "it's not working", what do you mean? What is happening? What was meant to happen? Are you getting any error messages (look at the error console). See ItDoesntWorkIsUseless for more.

Edit: though I'll point out one obvious thing. On line 9, what is name? On line 13, what is id? Etc. You haven't defined those variables anywhere.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61064
    
  66

Also, please be sure to use proper indentation. Making your code hard to read will not get you much help.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
name, id, state, etc are not defined anywhere!

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: my java script is not working