Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If statement with multiple conditions

Status
Not open for further replies.

YoelBenYossef

Programmer
Nov 16, 2005
38
CA
Hi there,
I'm using Javascript in an ASP application. I'm trying to get it to use multiple conditions for the if, and I can't remember the syntax for it. Is it && or And? I've currently written it like this:

else if (frmIronMountainRequest.Send.checked ==false) && (frmIronMountainRequest.BringBack.Send.checked ==false) && (frmIronMountainRequest.Shred.Send.checked ==false)


Thanks
Eric
 
It's && but you have to encase it in parens like this:
Code:
else if [COLOR=red]([/color](frmIronMountainRequest.Send.checked ==false) && (frmIronMountainRequest.BringBack.Send.checked ==false) && (frmIronMountainRequest.Shred.Send.checked ==false)[COLOR=red])[/color]



It's hard to think outside the box when I'm trapped in a cubicle.
 
it's &&, but all within the first parentheses:
Code:
else if ((frmIronMountainRequest.Send.checked == false)
    && (frmIronMountainRequest.BringBack.Send.checked ==false) 
    && (frmIronMountainRequest.Shred.Send.checked ==false)) {
  ...
}

-jeff
lost: one sig, last seen here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top