Hello , all this is my first time here so if i made some mistake forgive me

What I am trying to do here is the following:
I want with javascript to get all .pdf filename + extension and make a link to them in my webpage.
I made this to filter and find the file :
write("The contents of " + getCurrentFolder()); 

fileName = findFirstFile("*.pdf*"); // Find the first file matching the filter 
    fileName = findNextFile();  // Find the next file matching the filter
But how to post a link to them in my webpage ?