Start of a blackjack Game. Javascript Problem.

benjamin.morgan

New Member
Now I can't hide the hit button when someone busts. If they keep hitting hit it makes them lose 10 points until the button is unclickable. I have tried to hide the hit buttons in the code but none seem to work. Apart from that the adding and busting is working right. Also if you click the deal button after you bust and there is still a hit button showing 2 of them will show up after you click deal. The 2 buttons call a different function.

Site at http://blackjack.web44.net/blackjack/
 
Last edited:

benjamin.morgan

New Member
Not sure how that helps my problem of the hiding of the hit button not working. They coded theirs different than I did. The point of this was is that it is my first actual javascript project that isn't incorporated into someones website. I don't understand why hitbutton.style.display = "none"; doesn't work on any of the hit buttons.
 

chrishirst

Well-Known Member
Staff member
Well, as you do not appear to have an element with a name attribute value of "hitbutton", neither is there a variable called "hitbutton" that holds a reference to an element, it isn't going to do anything.
 
Top