INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

E-mail*
Handle

Password
Verify P'word
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Member Feedback

"...You have made an incredible site which is truly a great help to me in solving problems. A tip of my hat to you!..."

Geography

Where in the world do Tek-Tips members come from?
Helpful Member!Helpful Member!Helpful Member!BillyRayPreachersSon (Programmer)
17 Dec 03 18:55
I remember someone recently asked how to find out if a user had a certain font installed on their computer.

Unfortunately, I can't find the post anymore, but here's more information on how to do this on a webpage (when viewed using IE 6).

This information comes from Microsoft's MSDN library at:

http://msdn.microsoft.com/library/default.asp?url=/libr...


<HTML>
<SCRIPT>
function getFonts()
{
   var nFontLen = dlgHelper.fonts.count;
   var rgFonts = new Array();

   for ( var i = 1; i < nFontLen + 1; i++ )
   {
      rgFonts[i] = dlgHelper.fonts(i);
   }
   rgFonts.sort();

   for ( var j = 0; j < nFontLen; j++ )
   {
      document.write( rgFonts[j] + "<BR>" );
   }
}
</SCRIPT>
<BODY onload="getFonts()">
<OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-
00aa00bdce0b" width="0px" height="0px">
</OBJECT>
</BODY>
</HTML>


Dan
Find A Job or Post a Job Opening Click Here.
stormbind (TechnicalUser)
17 Dec 03 20:34
Neat! Cannot think of an application for it right now, but I'm sure that is handy information :)

CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b"

Isn't that cheating? LOL

Do they have a reference to all the possible clsid: on msdn? :/

----------
I'm willing to trade custom scripts for... [see profile]

simonchristieis (Programmer)
18 Dec 03 5:44
BillyRay,

It was me that started the original post, I have a use for this - the only problem is it don't work for me - I get an error

dlgHelper.fonts.count is null or not an object.

I am using ie6 on xp pro - any ideas why it wont work?

Thanks

Simon
Helpful Member!Helpful Member!Helpful Member!BillyRayPreachersSon (Programmer)
18 Dec 03 5:51
Simon,

You need to make sure the clsid has no line break in it... It should be one long continuous string:

"clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b"

Hope this helps!

Dan (although everyone seems to call me Billy despite the fact I always sign my posts off as Dan! *shrug*)
simonchristieis (Programmer)
18 Dec 03 6:00
Billy Ray,

Thanks, fantastic - exactly what I was looking for - I've given you a star - but you deserve more!!

Simon

Start A New Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Promoting, selling, recruiting and student posting
are not allowed in the forums.
Posting Policies

LINK TO THIS FORUM!
(Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum)
TITLE: Javascript Forum at Tek-Tips
URL: http://www.tek-tips.com/threadminder.cfm?pid=216
DESCRIPTION: Javascript technical support forum and mutual help system for computer professionals. Selling and recruiting forbidden.

 

Back To Forum