Copy link to clipboard
Copied
I have a text field that my user will enter a windows UNC path \\server\share. Is it possible to have a java script on that text fied that will change that path to be an Absolute path name in URI notation & make it a clickable link?
The manual process is to paste the windows UNC path, then highlight it, right click to create a hyperlink, then paste that same windows UNC path and chage the backslashes "\" to be forwardslashes "/".
Copy link to clipboard
Copied
Sure, it's a simple reg-exp command (to be used as a custom Validation or Calculation script):
event.value = event.value.replace(/\\+/g, "/");
You can't define it as a hyperlink automatically, though.
Copy link to clipboard
Copied
Try67,
That script work for the most part but when it runs it replaced the "\\" with the "//" but also the share of "\" was replace with 2 "//" vs one.
Copy link to clipboard
Copied
Sorry, I don't follow. Can you provide an example?
Copy link to clipboard
Copied
try67 - When the script ran it change the share name to double slashes when it needed to be one slash. EX \\server\share ended up being //server//share. I would like it to be //server/share
Thank you!
Copy link to clipboard
Copied
It doesn't do that for me... Can you share your file?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Remove the "+" sign from the RegExp, then.
Copy link to clipboard
Copied
Thank you try67! that worked.
Do you know of anyway in the adobe javascript tools guilde to make that an hyperlink?
Copy link to clipboard
Copied
No, sorry.