SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Whats is an .htc file?

    I was at a website and looking at the source and saw they have a .htc include within thier css file. This is what it contains:

    -------------------------------------

    <PUBLIC:COMPONENT>
    <PUBLIC:PROPERTY NAME="classOver" />
    <PUBLIC:PROPERTY NAME="classDown" />
    <PUBLIC:ATTACH event="onmouseout" handler="swapEffect" />
    <PUBLIC:ATTACH event="onmouseup" handler="swapEffect" />
    <PUBLIC:ATTACH event="onmousedown" handler="swapEffect" />
    <PUBLIC:ATTACH event="onmouseover" handler="swapEffect" />
    <PUBLIC:ATTACH event="onmouseup" handler="swapEffect" />

    <SCRIPT>
    // Copyright 1999 InsideDHTML.com, LLC. All rights reserved
    // This code can be reused as long as the above copyright
    // notice is not removed.
    var classDefault = element.className
    function swapEffect() {
    switch (event.type) {
    case "mousedown":
    if (classDown)
    element.className = classDown + " " + classDefault
    break;
    case "mouseup":
    case "mouseover":
    if (classOver)
    element.className = classOver + " " + classDefault
    break;
    default:
    element.className = classDefault
    }
    }
    </SCRIPT>
    </PUBLIC:COMPONENT>

    -------------------------------------

    this looks extremely intriging!!! What is this?
    Free Science Homework Help
    http://www.physicsforums.com

  2. #2
    epsilon transition cupid's Avatar
    Join Date
    Aug 2001
    Location
    Kent, Ohio
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a quote from http://www.webreference.com/js/tips/000623.html. Hope it helps!! ;/


    HTCs provide a simple mechanism to implement DHTML behaviors in script. An HTC file is nothing but an HTML file, saved with an .htc extension, that contain scripts and a set of HTC-specific custom elements that expose properties, methods, and events that define the component. All HTC elements are accessible from script as objects using their ID attributes. This allows all attributes and methods of HTC elements to be dynamically manipulated through script.

  3. #3
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good stuff, that could be rather handy

    I
    ll have to check out that site!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •