Manage Learn to apply best practices and optimize your operations.

Hiding and Positioning Attachments on the Web

When a file is attached over the Web, the File Attachment is visible when looking at the Doc in read mode. Here's a handy tip to hide a file attachment from Web clients and how to place the attachment where you want it on the form.

To hide a file attachment from Web clients simply add <noscript> to the end of your Notes form that is used for the attachment.

Although this isn't recommended as a security measure to stop access to the attachment (because the HTML source still shows the url for the attachment), You can use it to great effect in order to make an attachment appear in the correct place on a page (instead of the bottom).

To do this you use the <noscript> code above to remove the attachment, then you add anchor code to the document in the place where you wish the attachment to appear. It's best to add this code into a computed for display field, and then put the field wherever you wish the attachment to be displayed. If no attachemnts are found, blank is returned.

check :=@If(@AttachmentNames="";@Return("");"else proceed");
thename:=@AttachmentNames; path:=@Left(path_info;"?");
"<A TARGET = "_blank" HREF='"+thepath+"/$file/"+thename+"'><IMG BORDER=0 SRC='/icons/fileatt.gif'>"+ thename;

p.s. you need to ensure you have the path_info CGI Var on the top of your page.

Hope this is of use to someone!!!



Dig Deeper on Domino Resources - Part 5

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...