spacer
Yehuda Shiran September 29, 2000
Modifying Filters on the Fly
Tips: September 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Going Native With Chrome
Mozilla Fixes Firefox Flaws as 3.5 Release Nears
Microsoft and Novell Still Bosom Buddies

All filters support the enabled property, by which you can enable and disable them. In addition, each filter supports its own properties and sometimes its own methods. The filter's properties may be set during its definition and can be modified by a script. Let's modify a shadow color from red to tan, inside the script:

In this page we explain the basics of using filters.

Here is the full code of this filter:

<DIV ID="mydiv1" STYLE="width: 40%; filter: progid:DXImageTransform.Microsoft.engrave() 
progid:DXImageTransform.Microsoft.DropShadow(color='red', OffX=3, OffY=2)">
<IMAGE SRC="bicycle.gif"><FONT COLOR="blue">In this tip we explain the basics of 
using filters.</FONT>
</DIV>
<SCRIPT LANGUAGE="JavaScript">
<!--
mydiv1.filters.item(1).enabled = 1;
mydiv1.filters.item("DXImageTransform.Microsoft.engrave").enabled = 0;
mydiv1.filters.item("DXImageTransform.Microsoft.dropshadow").color = "tan";
// -->
</SCRIPT>

Learn more about filters in Column 68, Introduction to Filters in IE 5.5 and Up.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
XML and PHP Simplified · Creating a ASP.NET Contact Form · Data Filtering with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Intel to Host Live Nehalem Q&A · 12 Tips to Troubleshoot Network File-Sharing · 10 Tips for Selling on Kijiji