![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | Blogs | Mark Forums Read |
| Web Design Forums and discussions on webdesign |
Web Design | |||||||||
|
|
|
|
| |||||
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | I have an HTC that just does some simple things with text style that won't work in an HTA. If I include the same HTC in an HTML file on a web server, it works fine. Any reason why this doesn't work? I have given the text of the HTC and HTA files below. test2.hta ================================================== ============== <html> <head> <style> body {font-family:arial;font-size:10pt;background:threedface;} li {behavior:url(hilite.htc)} </style> <hta:application id="TestHTA" applicationName="Test HTML Application" border="thin" borderStyle="normal" caption="yes" icon="" maximizeButton="no" minimizeButton="yes" showInTaskbar="yes" singleInstance="yes" sysMenu="yes" version="1.0" windowState="normal" /> <script language="VBScript"> Sub SetWindowSize (iWidth, iHeight) Window.resizeTo iWidth, iHeight End Sub Sub SetTitle () Document.title = TestHTA.applicationName End Sub Sub Init () SetWindowSize 400, 400 SetTitle End Sub </script> </head> <body onLoad="Init"> <p>Mouse over the two list items below to see this effect.</p> <ul> <li>HTML Authoring</li> <li>Dynamic HTML</li> </ul> </body> </html> hilite.htc ================================================== ============== <PUBLIC:COMPONENT> <PUBLIC:ATTACH EVENT="onmouseover" ONEVENT="Hilite()" /> <PUBLIC:ATTACH EVENT="onmouseout" ONEVENT="Restore()" /> <SCRIPT LANGUAGE="JScript"> var normalColor, normalSpacing; function Hilite() { // save original values normalColor = runtimeStyle.color; normalSpacing= runtimeStyle.letterSpacing; runtimeStyle.color = "red"; runtimeStyle.letterSpacing = 2; } function Restore() { // restore original values runtimeStyle.color = normalColor; runtimeStyle.letterSpacing = normalSpacing; } </SCRIPT> </PUBLIC:COMPONENT> |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: [MV] 5T turbo usage | Ryan Gill | MV List | 0 | 02-21-2005 02:50 |
| Re: [MV] 5T turbo usage | Wayne Harris | MV List | 0 | 02-21-2005 02:50 |
| Re: [MV] 5T turbo usage | MV List | 0 | 02-21-2005 02:50 | |
| Problem / Question about resource usage and timescale data | =?Utf-8?B?Smlt?= | Microsoft Applications | 3 | 12-18-2004 10:00 |
| DRL gasoline usage | Neo | Automotive | 6 | 06-14-2004 21:29 |
![]() | ![]() | ![]() |