Expand my Community achievements bar.

SOLVED

Hyperlink script with a space

Avatar

Level 5

The form I created has a button. In the body of the email that comes from this button I included a link for locating the pdf on a server. For instance we'll say the complete link is:

\\nw\pacific\title\building\RA-12-18530 Enclosure

However the space between the number 18530 and Enclosure is creating problems in the hyperlink of the email. See Figure 1 below.

//var RAO = RA-12-18530

// This scirpt creates the hyperlink with the RA file name

var rao = xfa.resolveNode("form1.Page1.RA").rawValue;

var bdco = "\\\\nw\\pacific\\title\\building\\";

var loca  = bdco + rao + ".pdf";

var loca2 = bdco + rao + " Enclosure.pdf";

The space in front of the letter E of Enclosure and the quote mark is causing the script to not make "Enclosure" part of the hyperlink. How do I write the script to attach the word " Enclosure" to the hyperlink? Thanks.

Hyperlink.JPGFigure 1

1 Accepted Solution

Avatar

Correct answer by
Level 5

\xa0 will create a space in a link. Write the code as follows:

var loca2 = bdco + rao + "\xa0Enclosure.pdf";

http://forums.digitalpoint.com/showthread.php?t=2099418

Results in the hyperlink of an email continueing to include " Enclosure.pdf"

View solution in original post

1 Reply

Avatar

Correct answer by
Level 5

\xa0 will create a space in a link. Write the code as follows:

var loca2 = bdco + rao + "\xa0Enclosure.pdf";

http://forums.digitalpoint.com/showthread.php?t=2099418

Results in the hyperlink of an email continueing to include " Enclosure.pdf"