javascript thread: Populating A List Box With Font Names From Client Machine Windows\Fonts Folder
> well, this will give you a list off all the fonts on the client
machine...
> if you need more help... just reply
>
>
> <script language="javascript">
> function ShowFolderFileList(folderspec)
> {
> var fso, f, f1, fc, s, t;
> fso = new ActiveXObject("Scripting.FileSystemObject");
> f = fso.GetFolder(folderspec);
> fc = new Enumerator(f.files);
> s = "";
> for (; !fc.atEnd(); fc.moveNext())
> {
> t = fc.item();
> t = fso.GetFileName(fc.item());
> t = t.substr(0,t.length-4)
> s += t;
> s += "<br>";
> }
> fc.moveFirst()
> return(s);
>
> }
>
> document.write(ShowFolderFileList("C:\\Winnt\\Fonts"))
> </script>
>
>
> -----> well, this will give you a list off all the fonts on the client
machine...
> if you need more help... just reply
>
>
> <script language="javascript">
> function ShowFolderFileList(folderspec)
> {
> var fso, f, f1, fc, s, t;
> fso = new ActiveXObject("Scripting.FileSystemObject");
> f = fso.GetFolder(folderspec);
> fc = new Enumerator(f.files);
> s = "";
> for (; !fc.atEnd(); fc.moveNext())
> {
> t = fc.item();
> t = fso.GetFileName(fc.item());
> t = t.substr(0,t.length-4)
> s += t;
> s += "<br>";
> }
> fc.moveFirst()
> return(s);
>
> }
>
> document.write(ShowFolderFileList("C:\\Winnt\\Fonts"))
> </script>
>
>
> Hi Elliot and thanks for your reply. I tried to execute the above code
and for sure it worked. I also tried to get the actual font names because
the above is giving me the File Names. I'm really new to all this.
Thanks Again