Bookmark Topic Watch Topic
  • New Topic

Class Project

 
Adam Crouse
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
Here's my code:


This works for the most part but I am wondering how do I get the text field "status"
to be blank when the checkboxes "vision" and "dental" are deselected.

Thanks in advance.
 
Esmaeil Ashrafi
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Report post to moderator

In these two pieces of your code you used = instead of == in the inner IF statement.
the only thing you need is adding an ELSE statement and set the text field to an emty string :
 
Adam Crouse
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
OK...?
Then what is?
 
Esmaeil Ashrafi
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Report post to moderator
I think this is much better :
 
Adam Crouse
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thank you
 
Campbell Ritchie
Marshal
Posts: 52531
119
  • Mark post as helpful
  • send pies
  • Report post to moderator
Welcome to the Ranch

I presume you will use that code? Here at Teesside, that would be regarded as plagiarism and will get you a 0 overall mark. You could of course destroy the evidence by editing your posts, both of you. Please read this and this

In my opinion things like if (source.equals(foo)) . . . are not object-oriented design and I would take marks off for using that idiom. But I'm not marking your work.
 
Campbell Ritchie
Marshal
Posts: 52531
119
  • Mark post as helpful
  • send pies
  • Report post to moderator
Esmaeil Ashrafi has apologised in a PM for simply giving out the answer: apology accepted
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!