开发者

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 u开发者_如何学Cnderscore 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.


In your code, try to replace each ampersand with &

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜