INTELLIGENT WORK FORUMS FOR COMPUTER PROFESSIONALS
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!
*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

(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?
|
Client-side font list
|
|
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 |
|
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] |
|
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 |
|
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*)
|
|
Billy Ray,
Thanks, fantastic - exactly what I was looking for - I've given you a star - but you deserve more!!
Simon
|
|
|
 |
|