Hyperlynk local file

Hyperlynk local file

Hi,

I am trying to create a hyperlink to a local file, however I keep running into an issue.
The user should enter the path in a string field. From this string field I then make the hyperlink as followed:
  1. mypath = input.filepath;
  2. filehandle = "file:///";
  3. new_link = "<a href=\"" + filehandle + mylink + "\">" + mylink + "</a>";
  4. input.url_link= new_link
  5. input.new_link_string = new_link //this variable is to verify the newly created link
new_link_string displays the newly created link properly, however when trying to open url_link the colon (:) in filehandle disappear, leading to a failed url get

Why does the colon get dropped, and how can I prevent that?