>> I have a form with a question and child questions
cliveswan@yahoo.co.uk wrote On 04/16/07 16:51,:
> Note, too, that the logic is flawed: The test (after
> correction) will produce a validation warning if the
> first box is checked or if any of the others is unchecked.
> From your description, I doubt that's what you want.
Also note that multi-posting causes people to answer your questions without
knowledge of each other's answers and is very rude, as it makes those of us
who try to help feel that you have taken advantage of us and caused us to
waste our time.
Please do not multi-post.
> Lew wrote:
>> Clive wrote:
[quoted text clipped - 4 lines]
>> You're not allowed to put the OR operator (||) after the closing
>> parenthesis of the condition.

Signature
Lew
cliveswan@yahoo.co.uk - 17 Apr 2007 09:36 GMT
Hi,
This is a different question from the previous.
It is looking at validating a question & connected child question
in a row!!!
I tried to write a bit of code THAT does not work.
Trying to understand why!!
Clive
>the same question taken advantage of us and caused us to
> waste our time.
>
> Please do not multi-post.
cliveswan@yahoo.co.uk - 17 Apr 2007 10:19 GMT
Hi eric & Lew,
Am I still not getting the 'logic'
Trying to say:
if a = 1 and ( (b + c + d ) = 0 ){
Then throw a warning
}
if( page8.getWasteWaterProblem() == 1 ) &&
( ( (page8.getWasteWaterLocationProblemHome() ) +
(page8.getWasteWaterLocationProblemGarden() )
+ (page8.getWasteWaterLocationProblemCommonArea()) == 0) ) {
validationResultPage8.addWarning("WasteWaterProlemHome", "warning
for Q6c");
}
This still says "illegal start of expression"??????
I do not understand why.
Cheers
Clive
Clive - 17 Apr 2007 10:26 GMT
> >> I have a form with a question and child questions
>
[quoted text clipped - 9 lines]
> who try to help feel that you have taken advantage of us and caused us to
> waste our time.
I popsted it here by mistake.
You are not able to delete a question, posted by mistake.
Clive
> Please do not multi-post.
>
[quoted text clipped - 9 lines]
> --
> Lew
Clive - 17 Apr 2007 10:29 GMT
> >> I have a form with a question and child questions
>
[quoted text clipped - 9 lines]
> who try to help feel that you have taken advantage of us and caused us to
> waste our time.
It would be useful, if the list had an option to delte questions, sent
to the wrong
newsgroup!! This was meant for developers NOT database
> Please do not multi-post.
>
[quoted text clipped - 9 lines]
> --
> Lew
cliveswan@yahoo.co.uk - 17 Apr 2007 11:42 GMT
> >> I have a form with a question and child questions
>
[quoted text clipped - 9 lines]
> who try to help feel that you have taken advantage of us and caused us to
> waste our time.
I FINALLY saw each argument must be within ( ). That went over my
head.
This ran without any errors.
BUT does it actually do what is says: ( (a=0 + b=0 + c=0) and (d =
1) )
then throw warning?????
Cheers
Clive
if ( ( page8.getWasteWaterLocationProblemHome() == 0 &&
page8.getWasteWaterLocationProblemGarden() == 0 &&
page8.getWasteWaterLocationProblemCommonArea() == 0) &&
( page8.getWasteWaterProblem() == 1) ) {
validationResultPage8.addWarning("WasteWaterProlemHome", "warning
for WasteWaterProlemHome from type 6c");
}
> Please do not multi-post.
>
[quoted text clipped - 9 lines]
> --
> Lew
cliveswan@yahoo.co.uk - 17 Apr 2007 11:45 GMT
I FINALLY saw each argument must be within ( ( ) && ( ) ). That went
over my head.
This ran without any errors.
BUT does it actually do what is says: ( (a=0 + b=0 + c=0) and (d =
1) )
then throw warning?????
Cheers
Clive
if ( ( page8.getWasteWaterLocationProblemHome() == 0 &&
page8.getWasteWaterLocationProblemGarden() == 0 &&
page8.getWasteWaterLocationProblemCommonArea() == 0)
&&
( page8.getWasteWaterProblem() == 1) ) {
validationResultPage8.addWarning("WasteWaterProlemHome", "warning
for WasteWaterProlemHome from type 6c");
}
Lew - 17 Apr 2007 12:59 GMT
> I FINALLY saw each argument must be within ( ( ) && ( ) ). That went
> over my head.
<http://java.sun.com/docs/books/tutorial/java/nutsandbolts/if.html>
They aren't arguments, they're conditions.
> This ran without any errors.
>
> BUT does it actually do what is says: ( (a=0 + b=0 + c=0) and (d =
> 1) )
> then throw warning?????
(You only need one question mark to signify a question.)
I am confused. It ran without errors or it threw a warning?
To answer your question, code always does what it says. It just might not do
what you think.
> if ( ( page8.getWasteWaterLocationProblemHome() == 0 &&
> page8.getWasteWaterLocationProblemGarden() == 0 &&
[quoted text clipped - 6 lines]
> for WasteWaterProlemHome from type 6c");
> }
If you have a question, please provide an SSCCE and copy-and-paste (do not
describe) the error message, and ask the question.
You should also follow standard indentation conventions; your code snippet is
not formatted for readability.

Signature
Lew