-
If Else Syntax
Ok I have a problem..I made my own lil Folder link.
-
Re: If Else Syntax
Hi RHDxSPAWNx,
You can't achieve this by using template language alone. You will need a combination of dax and javascript here. The IF syntax is very simple:
<dax:if(condition)>
...
<dax:else>
...
</dax:if>
...however, the condition can only be one field or macro variable. The only test possible is one that checks if the field is empty, or if macro variable is "true".
E.g.:
<dax:if(composer)> - tests if Composer field has anything in it.
<dax:if(single)> - tests if Single checkbox is checked.
What you need is approximately this:
<div id="acdc" style="display:none"> .... <div>
<div id="notacdc"> .... </div>
<script type="text/javascript">
var a = '<dax:artist/>';
if (a=='AC/DC') {
document.getElementById('notacdc').style.display=' none';
document.getElementById('acdc').style.display='';
}
</script>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules