Go Back   Trackpads Community > General Discussions > Computer and Technology > Web Design

Web Design Forums and discussions on webdesign

Web Design

Reply
 
LinkBack Thread Tools
Old 07-19-2005, 16:00   #1 (permalink)
mnvikefan
Civilians

 
Default problem with HTC usage in HTA

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>

 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 20:54.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.73641 seconds with 19 queries