How to deal with the attachment Link under B/S in the Domino System

Source: Internet
Author: User

How to deal with the attachment Link under B/S in the Domino System

The attachment links of the Domino System under B/S are placed at the bottom of the page, which affects the layout and layout of the whole page.

Solution:
In B/S, the general method for handling attachments is to add the field $ v2attachmentoptions to the form and set the value to 0 to hide the default attachment link of the system, then write the link as follows:

1. Connections in read-only mode

Code:
Thisdb: = @ replacesubstring (@ subset (@ dbname;-1); ""; "+ ");"\\";"/");
@ If (@ attachments! = 0; "[<a href = \"/"+ thisdb +"/0/"+ @ text (@ documentuniqueid) + "/$ FILE/" + @ attachmentnames + "\" target = \ "_ blank \"> "+ @ attachmentnames +" </a>] ";")

2. The Selection box contains links for users to delete

Code:
Thisdb: = @ replacesubstring (@ subset (@ dbname;-1); ""; "+ ");"\\";"/");
@ If (@ attachments! = 0; "[<input type = checkbox name = \" % detach.1 \ "value = \" "+ @ attachmentnames +" \ "> <a href = \"/"+ thisdb + "/0/" + @ text (@ documentuniqueid) + "/$ FILE/" + @ attachmentnames + "\" target = \ "_ blank \"> "+ @ attachmentnames +" </a>] ";")

However, when the attachment name contains special symbols such as "#" and "&", the link written above will be truncated in the special symbol, resulting in the attachment cannot be opened normally. To solve this problem, you need to convert these special symbols when writing the link. The specific method is as follows:

Code:
Thisdb: = @ replacesubstring (@ subset (@ dbname;-1); ""; "+ ");"\\";"/");
AA: = @ urlencode ("Domino"; @ attachmentnames );
@ If (@ attachments! = 0; "[<a href = \"/"+ thisdb +"/0/"+ @ text (@ documentuniqueid) + "/$ FILE/" + AA + "\" target = \ "_ blank \"> "+ @ attachmentnames +" </a>] ";")

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.