|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
Hello,
I'm trying to create a Webpublisher report where if the Image field (which doesn't show on the report) is populated, then the value in the title field (which does show on the report) will be an Expand Record link, but if the Image field is not populated, then the value in the title field will just be plain text. My code is below, followed by the output I'm getting, followed by the output I desire! Thanks in advance. This is what I have on my report form: <div id="varTitleLink" style="display:none">245a</div> /* this line is a form box, the database field is 245a, and it's an Expand record link */ <div id="varTitleNoLink" style="display:none">245a</div> /* this line is a form box, the database field is 245a, and it's raw HTML */ <script type="text/javascript" language="JavaScript"> var hasImage="" var hasImage="Image" /* this line is a form box, the database field is Image, and I'll just be checking whether this field is populated */ var divTitleLink = document.getElementById(varTitleLink').innerHTML; var divTitleNoLink = document.getElementById('varTitleNoLink').innerHTML; if (hasImage != "") { document.write(divTitleLink); } else { document.write(divTitleNoLink); } </script> The output I'm seeing is this: 1 William Allyn papers 2 William Allyn papers 3 William Allyn papers 4 William Allyn papers 5 William Allyn papers but I want to be seeing this: 1 William Allyn papers 2 American Society of Cinematographers records 3 Carl Anderson papers 4 Edit Angold papers 5 Jane Ardmore papers where the blue text is an expand record link. I'm open to an entirely different method if you know one that works... Zoe |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|

