AND Operator in af:resource in javascript throwing error

within af:resource component in javascript, use of the && for comparison throws the following error:

Expected name instead of &

The second ampersand is highlighted with a wavy red underscore when this error is thrown.

The sample code is shown below.

blnTargetRowReady = (targetIndex==1 && targetDestinationComponent.getValue()==null && targetOriginComponent.getValue()==null && targetSelectComponent.checked==false && targetDateComponent.getValue()!=null);

I notice when i subsitute the && with || this error does not occur.

Does anyone know why this error occurs on the page. The page runs fine when run in the browser, ie with the ampersand, but in JDeveloper the relevant page shows up with an error.

Any guidance you can provide i would appreciate it.

-------------Problems Reply------------

In your code, try to replace each ampersand with &

blnTargetRowReady = (targetIndex==1 && targetDestinationComponent.getValue()==null && targetOriginComponent.getValue()==null && targetSelectComponent.checked==false && targetDateComponent.getValue()!=null);

Category:jdeveloper Views:0 Time:2011-04-22

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.074 (s). 11 q(s)