Closed Thread Icon

Topic awaiting preservation: HTC behaviors Pages that link to <a href="https://ozoneasylum.com/backlink?for=8058" title="Pages that link to Topic awaiting preservation: HTC behaviors" rel="nofollow" >Topic awaiting preservation: HTC behaviors\

 
Author Thread
hlaford
Bipolar (III) Inmate

From: USA! USA! USA!
Insane since: Oct 2001

posted posted 02-01-2002 22:20

Is there an issue with using document.getElementById inside of a behavior? It doesn't seem to return a valid object when called within the behavior, but it works fine outside in a normal JS file.

Ideas?

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 02-02-2002 05:41

behavior?

What do you mean by behavior?

hlaford
Bipolar (III) Inmate

From: USA! USA! USA!
Insane since: Oct 2001

posted posted 02-04-2002 17:12

A behavior is a bit of JavaScript assigned to an element via CSS. It's a handy way of encapsulating and applying common code. Unfortunately, there seem to be some quirks to their use.

http://msdn.microsoft.com/workshop/author/behaviors/overview.asp


I did manager to find the issue: using "document" on its own resolves to the document contained in the HTC file itself. Use "element.document" to reference the document containing the element to which the behavior is applied.


[This message has been edited by hlaford (edited 02-04-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu