I have a navigation bar in a .jsp file whereby I want it where if an imported java condition returns null then (using inline css), set the link in the navigation to display:none; else display:block; This is what I came up with so far but eclipse doesn't seem to like it when I add none and block:
<li><a style="display:<%if(Settings.getInstance().getExternalDataLocation()!= null){
none;"
}else{
block;"}%>
</li>
The following errors also seem to appear under the red lines of 'none' and 'block':
- Syntax error, insert "VariableDeclarators" to complete
LocalVariableDeclaration
- Syntax error on token "block", } expected
- Syntax error, insert ";" to complete BlockStatements
I'm sure the errors are self explanatory but I still cant seem to get my head round resolving them or even knowing if I am missing the correct syntax. Hope someone can point me in the right direction.