[Javascript] multiple ifs on one line syntax

Colin Cochrane colin at vfs.com
Thu Jun 6 09:52:18 CDT 2002


>if(form.TransType.options[form.TransType.selectedIndex].value == 'S') and
>(form.RecipientAgency.value=='P')   {
>...

Sorry, that ought to be '&&' for 'and' and  '||' for 'or'.
ie:

if((form.TransType.options[form.TransType.selectedIndex].value == 'S') &&
(form.RecipientAgency.value=='P'))   {


Hope this helps

cdc


Colin Cochrane
Head Instructor
Vancouver Film School New Media
http://www.vfs.com/
Tel: (604) 685-6331 Ext 209
Fax: (604) 685-6308

Vancouver Film School. Creative. Disciplined. Focused.





More information about the Javascript mailing list