Monday, May 13, 2024
97
rated 0 times [  99] [ 2]  / answers: 1 / hits: 43617  / 15 Years ago, sat, october 24, 2009, 12:00:00

What is difference between .htc and .js file? Can we convert any .htc file to a .js file?



The problem is if we use htc to make png fixes, then we add htc to css file using



body { behavior: url(csshover3.htc); } 


But this is not W3C valid, so want to convert the .htc to .js and then use as a js file to attach in so it will be W3C valid.



Can anyone tell me how to convert and use any .htc file as JavaScript file?


More From » html-components

 Answers
61

Technically, you can use conditional comments to allow the code to validate.



http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx



A hack is a hack, it's just weird that MS made this hack in a way that it's a valid hack.



Now, something else to consider - are you using a JavaScript library? Then you should be using the library to do this functionality, which would eliminate the need for the HTC (which needs JavaScript enabled to run).


[#98455] Monday, October 19, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
patienceannel

Total Points: 674
Total Questions: 101
Total Answers: 101

Location: Northern Mariana Islands
Member since Fri, Jan 15, 2021
3 Years ago
;