Click here to Skip to main content
15,885,028 members
Articles / Web Development / IIS

xLibrary - Using a custom IHttpHandler to access embedded JavaScript

Rate me:
Please Sign up or sign in to vote.
4.33/5 (4 votes)
28 Feb 2009CPOL15 min read 44.6K   446   41  
This article covers how to make a custom IHttpHandler to use the X Library from www.cross-browser.com embedded in an assembly.
<?xml version="1.0" encoding="ISO-8859-1"?>

<x_symbol id='xAnimation.css'>

<sources>
  <src><file>xanimation.css.js</file><note><![CDATA[Default.]]></note></src>
</sources>

<copyright>Copyright 2006-2007 Michael Foster (Cross-Browser.com)</copyright>
<license>Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL</license>

<groups>
  <grp>Animation</grp>
</groups>

<type>Method</type>

<description><![CDATA[Animate an element's CSS property that accepts integer pixel values. This is an xAnimation method.]]></description>

<syntax>xa.css(e, p, v, t[, a[, b[, oe]]]);</syntax>

<parameters>
  <par><name>xa</name><note><![CDATA[An xAnimation object.]]></note></par>
  <par><name>e</name><note><![CDATA[An Element object reference or an id string.]]></note></par>
  <par><name>p</name><note><![CDATA[The CSS property name (string).]]></note></par>
  <par><name>v</name><note><![CDATA[The target value (integer).]]></note></par>
  <par><name>t</name><note><![CDATA[The total time for the animation, in milliseconds.]]></note></par>
  <par><name>a</name><note><![CDATA[Acceleration type: 0=none(constant velocity), 1=sine(fast start, slow end), 2=cosine(slow start, fast end), 3=combined(slow start, fast mid, slow end). This is optional, the default is 0.]]></note></par>
  <par><name>b</name><note><![CDATA[Bounces: 0=no bounce, 1=from start to end then bounce back to start, 2=from start to end then bounce back to start then bounce back to end, etc. Ignored when a=0. This is optional, the default is 0.]]></note></par>
  <par><name>oe</name><note><![CDATA[The onEnd handler. It can be a function reference or a string. It will be executed at the completion of the animation. The handler will receive the xAnimation object as an argument and the handler's "this" also points to the xAnimation object. If the handler returns or evaluates true then the animation will be repeated. This is optional.]]></note></par>
</parameters>

<dependencies>
  <dep>xAnimation</dep>
  <dep>xGetComputedStyle</dep>
  <dep>xCamelize</dep>
</dependencies>

<demos>
  <demo><url>http://cross-browser.com/x/examples/xanimation.html</url><note><![CDATA[Start page of all xAnimation demos.]]></note></demo>
</demos>

<tests>
</tests>

<comments>
</comments>

<revisions>
  <rev><num>2</num><date>15Apr07</date><author>mf</author><note><![CDATA[xAnimation object re-implemented.]]></note></rev>
  <rev><num>1</num><date>25Sep06</date><author>mf</author><note><![CDATA[Initial release.]]></note></rev>
</revisions>

</x_symbol>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
I have been a software developer since 2005, focusing on .Net applications with MS SQL backends, and recently, C++ applications in Linux, Mac OS X, and Windows.

Comments and Discussions