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;"?");
thepath:=@If(path="";path_info;path);
"<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!!!

Regards

Rob

This was last published in November 2000

Dig Deeper on Domino Resources - Part 5

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close