This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes problem in simple calculator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "problem in simple calculator" Watch "problem in simple calculator" New topic

problem in simple calculator

deepak bhai
Ranch Hand

Joined: Apr 22, 2011
Posts: 33

i wanted to make a simple calculator, i wanted to see if we can pass the element by document.getElementById("value") and then extract it later in the java script code .. but i dont know where it go wrong.. please help
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62139

Your HTML syntax is severely screwed up. Check the quoting of your attributes. Also, do your onclicks really do what you intend (even if they were correctly declared)?

Sloppy syntax such as this is exactly why Unobtrusive JavaScript -- in which no script is included in the document markup -- is a great idea.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
deepak bhai
Ranch Hand

Joined: Apr 22, 2011
Posts: 33
ok its solved ..

jQuery in Action, 2nd edition
subject: problem in simple calculator