Senin, 05 Januari 2026

Masih di Intel Web Design Effects Software

 

Intel Web Design Effects
How To Change the Position of an Effect in Your Web Page

By default, when you export your animated effect to an HTML page, the effect’s upper left corner is in the X,Y coordinate of 0,0 (the upper left corner of the browser window). You can edit the HTML file and change the X.Y coordinates so that the effect appears anywhere in your web page.

Open the HTML file in your editor and locate the following section:

</script>
<!-- **** Modify "Xposition" and "Yposition" parameters below, to move the effect (background & mask). Xposition=0, Yposition=0 defaults to upper left corner of the browser screen. **** -->
<script language="JavaScript">
<!--

var Xposition = 0;
var Yposition = 0;

Change the coordinates and save the HTML file.

PLEASE NOTE:
This product is no longer being manufactured by Intel. THESE DOCUMENTS ARE PROVIDED FOR HISTORICAL REFERENCE PURPOSES ONLY AND ARE SUBJECT TO THE TERMS SET FORTH IN THE "LEGAL INFORMATION" LINK BELOW. For information on currently available Intel products, please see www.intel.com and/or developer.intel.com


Intel Web Design Effects
Troubleshooting Tips

What type of system can I use to view an effect?

Where can I get the NPPROCPLUG.DLL plugin for NetScape*?

People who view my web page do not see any animated effects. The pictures are static. What is wrong?

Error: "(javascript application) Please enable the JAR Installation Manager and then reload this page."

The Web Design Effects images overlap the text on the page, making it unreadable. How do I fix it?

What type of system can I use to view an effect?
Visual experience of Intel Web Design Effects will vary depending on processor type, speed, and size of the effect. This is our recommendation:

MinimumRecommended
ProcessorIntel Pentium® processorPentium II processor or Pentium processor with MMX™ technology
Memory16MB32MB
Operating SystemWindows* 95 or Windows NT* 4.0Windows* 95 or Windows NT* 4.0
VideoHi-color (16-bit) Windows compatible or greaterHi-color (32-bit) Windows compatible
BrowserMicrosoft Internet Explorer* 4.0 (or higher) OR Netscape Navigator* 4.0 (or higher) with the NPPROCPLUG.DLL plug-in

Where can I get the NPPROCPLUG.DLL plugin for NetScape*?
The NPPROCPLUG.DLL, which allows you to view effects created with Web Design Effects under Netscape Navigator* 4.0 or later, is available from Intel’s support website.

People who view my web page do not see any animated effects. The pictures are static. What is wrong?
In order to view the animated effects, you must be using a supported browser. Supported browsers include Microsoft Internet Explorer* 4.0 or later and Netscape Navigator 4.0 or later with the NPPROCPLUG.DLL plugin.

Error: "(javascript application) Please enable the JAR Installation Manager and then reload this page."
If you are using Netscape Navigator* 4.01, 4.01a, 4.03, or 4.04, you may get the following error message when accessing a website that includes an effect created by Web Design Effects. This error can also occur when accessing Intel’s Web Design Effects support website to download the Netscape plugin. You’ll need to configure your browser preferences to enable Java, JavaScript, and Autoinstall. In Netscape Navigator*, click Edit > Preferences > Advanced. Click the checkboxes on the following items to enable them:

Enable Java
Enable JavaScript
Enable AutoInstall

Then reload the webpage in your browser.

The Web Design Effects images overlap the text on the page, making it unreadable. How do I fix it?
Efffects are hard-coded into position on a webpage. Depending on what font size your browser is set for, the text may move up or down the page and end up behind one of the images. Try decreasing or increasing the font size preference in your browser.

PLEASE NOTE:
This product is no longer being manufactured by Intel. THESE DOCUMENTS ARE PROVIDED FOR HISTORICAL REFERENCE PURPOSES ONLY AND ARE SUBJECT TO THE TERMS SET FORTH IN THE "LEGAL INFORMATION" LINK BELOW. For information on currently available Intel products, please see www.intel.com and/or developer.intel.com

Intel® Web Design Effects for HTML Browsers

You can use Web Design Effects to quickly and easily create dynamic, realistic animated effects for your Web site. Unlike animated GIFs, which play a defined number of cells over and over, Web Design Effects gives you random, non-repeating animation that takes advantage of the client processing power. With this version of WDE you can create atmospheric effects that look like fire, water, clouds, and fog.

Web author and content owner benefits
The Web Design Effects Editor can run as a stand-alone, or as a plug-in to HotDog Pro* 5, an authoring tool available from Sausage Software at www.sausage.com. The Web Design Effects editor features a palette editor, controls for speed, direction and turbulence, and a gallery of effects.

Start with one of the gallery images and make it into your own custom effect; a simple movement of a control or a change in palette customizes your work. When you add a cloud effect to a still image, the entire picture seems to come alive and look like a streaming video.

Web Design Effects supports viewing through Microsoft Internet Explorer* 4.0-5.0 and offers a plug-in for Netscape Navigator* 4.0-5.0. The results are client-rendered, scalable solutions that increase performance (based on processor speed), and that avoid bandwidth limitations.

Check out the tools, demos, and client playback options for Web Design Effects.

WDE for HTML Browsers Plug-ins
Support for WDE for HTML Browsers
Other Intel Architecture Labs Multimedia Tools

Intel® Web Design Effects
Scalable low-bandwidth procedural content for the Internet

Intel Web Design Effects

Intel Web Design Effects


The IAL Internet Media Initiative presents Intel® Web Design Effects (WDE) for Web developers. We offer three new versions of scalable client-based technologies that add media and excitement to your Web content. Whether you're authoring in HTML, Macromedia Director* 7 Shockwave* or the RealNetworks RealPlayer* G2, Intel Web Design Effects offers you authoring tools and client plug-ins that deliver.

Our newest version is available from RealNetworks under the name RealText 3D*. This version of WDE provides a 3-D engine which creates client-generated 3-D text, animation, and effects. Our HTML version comes with atmospheric effects. Our Macromedia Director* 7 version comes with atmospheric and distortion features. Use WDE as a cast member and take advantage of all the features of Director.

The WDE family of technologies is about "client-generated" experiences that avoid bandwidth limitations and reduce the wait for a media experience on the client side. In general, the atmospheric and distortion effects are based on pixel animation. RGB (red, green, blue) values of pixels are changed rapidly in a designated area. This produces the appearance of non-repeating patterns. These patterns create animations that look like fire, or a distortion that resembles a reflection in a mirror. The 3-D implementation of WDE takes simple text and converts it into 3-D, using the client's TrueType* fonts.

To enjoy the rich experience this technology offers, you only need to download the client plug-ins specific to the different implementations to view a WDE effect. Instead of sending lots of bitmaps to produce the animation or sending large geometry files, WDE sends the instructions to the client. Then, the experience is produced and rendered on the client with less wait, less hassle, and a great visual experience.

Each version of Web Design Effects has an authoring solution to make it simple to create and add these features to your Web content. See how quick and easy it is to learn this technology, and observe how animated GIFs or video don't duplicate the results you'll achieve with WDE. Check out our tools page for details.

Take a look at our three versions of Intel Web Design Effects and discover a new way to differentiate your Web content on the crowded information highway.






Minggu, 04 Januari 2026

Calculator VBScript JScript Year 2000


 

<html><head>

<title>Scripting Web Page</title> 

</head>


<body bgcolor="pink" link="#993366" vlink="#663366" topmargin="0" leftmargin="0" >

<BR><BR>

<center>

  <h2>

Samples:Calculator <BR>

<i>Last updated:  1/04/00 </i>

</h2>

</center>

<font size="3">

<script language="VBScript">

<!-- 

' Module-level variables

Dim Accum ' Previous number (operand) awaiting operation

Dim FlagNewNum ' Flag to indicate a new number (operand) is being entered

Dim PendingOp ' Pending operation waiting for completion of second operand


Sub NumPressed(Byval Num)

If FlagNewNum Then

    Document.Keypad.Readout.Value  = Num

    FlagNewNum = False

Else

If Document.Keypad.Readout.Value = "0" Then

Document.Keypad.Readout.Value = CStr(Num)

Else

Document.Keypad.ReadOut.Value= Document.Keypad.ReadOut.Value & CStr(Num)

End If

End If

End Sub


Sub Decimal_onClick()

Dim curReadout

curReadOut = Document.Keypad.ReadOut.Value

If FlagNewNum Then

curReadOut = "0."

FlagNewNum = False

Else

If InStr(curReadOut, ".") = 0 Then

curReadOut = curReadOut & "."

End If

End If

Document.Keypad.ReadOut.Value = curReadOut

End Sub


Sub Plus_onClick()

Operation "+"

End Sub


Sub Minus_onClick()

Operation "-"

End Sub


Sub Multiply_onClick()

Operation "*"

End Sub


Sub Divide_OnClick()

Operation "/"

End Sub


Sub Operation(Byval Op)

Dim Readout

ReadOut = Document.Keypad.ReadOut.Value

If FlagNewNum and PendingOp <> "=" Then

' User is hitting op keys repeatedly, so don't do anything

Else

FlagNewNum = True

Select Case PendingOp

Case "+"

Accum = CDbl(Accum) + CDbl(ReadOut)

Case "-"

Accum = CDbl(Accum) - CDbl(ReadOut)

Case "/"

Accum = CDbl(Accum) / CDbl(ReadOut)

Case "*"

Accum = CDbl(Accum) * CDbl(ReadOut)

Case Else

Accum = ReadOut

End Select

Document.Keypad.ReadOut.Value = Accum

PendingOp = Op

End If

End Sub


Sub ClearEntry_onClick()

' Remove current number and reset state

    Document.Keypad.ReadOut.Value = "0"

    FlagNewNum = True

End Sub


Sub Clear_onClick()

' Clear accumulator and pending operation, and clear display

  Accum = 0

  PendingOp = ""

ClearEntry_onClick

End Sub


Sub Neg_onClick()

Document.Keypad.ReadOut.Value = CDbl(Document.Keypad.ReadOut.Value) * -1

End Sub


Sub Percent_onClick()

Document.Keypad.ReadOut.Value = (CDbl(Document.Keypad.ReadOut.Value) / 100) * Accum

End Sub


Sub Equals_OnClick()

Operation "="

End Sub

-->

</script>


<center>

<form name="Keypad" action="">

<table>

<b>

<table border="2" width="50" height="60" cellpadding="1" cellspacing="5">

<caption align="top"><p>

</caption>

<tr>

<td colspan="3" align="MIDDLE"><input name="ReadOut" type="Text" size="24" value="0" width="100%"></td>

<td></td>

<td><input name="Clear" type="Button" value="  C  "></td>

<td><input name="ClearEntry" type="Button" value="  CE "></td>

</tr>

<tr>

<td><input name="Seven" type="Button" value="  7  " onclick="NumPressed(7)"></td>

<td><input name="Eight" type="Button" value="  8  " onclick="NumPressed(8)"></td>

<td><input name="Nine" type="Button" value="  9  " onclick="NumPressed(9)"></td>

<td></td>

<td><input name="Neg" type="Button" value=" +/- "></td>

<td><input name="Percent" type="Button" value="  % "></td>

</tr>

 <tr>

<td><input name="Four" type="Button" value="  4  " onclick="NumPressed(4)"></td>

<td><input name="Five" type="Button" value="  5  " onclick="NumPressed(5)"></td>

<td><input name="Six" type="Button" value="  6  " onclick="NumPressed(6)"></td>

<td></td>

<td align="MIDDLE"><input name="Plus" type="Button" value="  +  "></td>

<td align="MIDDLE"><input name="Minus" type="Button" value="   -   "></td>

</tr>

<tr>

<td><input name="One" type="Button" value="  1  " onclick="NumPressed(1)"></td>

<td><input name="Two" type="Button" value="  2  " onclick="NumPressed(2)"></td>

<td><input name="Three" type="Button" value="  3  " onclick="NumPressed(3)"></td>

<td></td>

<td align="MIDDLE"><input name="Multiply" type="Button" value="  *  "></td>

<td align="MIDDLE"><input name="Divide" type="Button" value="   /   "></td>

</tr>

<tr>

<td><input name="Zero" type="Button" value="  0  " onclick="NumPressed(0)"></td>

<td><input name="Decimal" type="Button" value="   .  "></td>

<td colspan="3"></td>

<td><input name="Equals" type="Button" value="  =  "></td>

</tr>

</table>

</b>

</form>

</table></center></body></html>

============================================

<html><head>

<title>Scripting Web Page</title>



</head>


<body bgcolor="FFFFFF" link="#993366" vlink="#663366" topmargin="0" leftmargin="0" >


<font face="VERDANA, ARIAL, HELVETICA" size="2">


<form name="Keypad" action="">

<table>

<b>

<table border="2" width="50" height="60" cellpadding="1" cellspacing="5">


<tr>

<td colspan="3" align="MIDDLE"><input name="ReadOut" type="Text" size="24" value="0" width="100%"></td>

<td></td>

<td><input name="btnClear" type="Button" value="  C  " onclick="Clear()"></td>

<td><input name="btnClearEntry" type="Button" value="  CE " onclick="ClearEntry()"></td>

</tr>


<tr>

<td><input name="btnSeven" type="Button" value="  7  " onclick="NumPressed(7)"></td>

<td><input name="btnEight" type="Button" value="  8  " onclick="NumPressed(8)"></td>

<td><input name="btnNine" type="Button" value="  9  " onclick="NumPressed(9)"></td>

<td></td>

<td><input name="btnNeg" type="Button" value=" +/- " onclick="Neg()"></td>

<td><input name="btnPercent" type="Button" value="  % " onclick="Percent()"></td>

</tr>

 

<tr>

<td><input name="btnFour" type="Button" value="  4  " onclick="NumPressed(4)"></td>

<td><input name="btnFive" type="Button" value="  5  " onclick="NumPressed(5)"></td>

<td><input name="btnSix" type="Button" value="  6  " onclick="NumPressed(6)"></td>

<td></td>

<td align="MIDDLE"><input name="btnPlus" type="Button" value="  +  " onclick="Operation('+')"></td>

<td align="MIDDLE"><input name="btnMinus" type="Button" value="   -   " onclick="Operation('-')"></td>

</tr>

<tr>

<td><input name="btnOne" type="Button" value="  1  " onclick="NumPressed(1)"></td>

<td><input name="btnTwo" type="Button" value="  2  " onclick="NumPressed(2)"></td>

<td><input name="btnThree" type="Button" value="  3  " onclick="NumPressed(3)"></td>

<td></td>

<td align="MIDDLE"><input name="btnMultiply" type="Button" value="  *  " onclick="Operation('*')"></td>

<td align="MIDDLE"><input name="btnDivide" type="Button" value="   /   " onclick="Operation('/')"></td>

</tr>

<tr>

<td><input name="btnZero" type="Button" value="  0  " onclick="NumPressed(0)"></td>

<td><input name="btnDecimal" type="Button" value="   .  " onclick="Decimal()"></td>

<td colspan="3"></td>

<td><input name="btnEquals" type="Button" value="  =  " onclick="Operation('=')"></td>

</tr>

</table>


</b>

</form>


<script language="JavaScript">

<!--

    // Module-level variables

    var FKeyPad = document.Keypad;

    var Accum = 0; // Previous number (operand) awaiting operation

    var FlagNewNum = false;   // Flag to indicate a new number (operand) is being entered

    var PendingOp = "";   // Pending operation waiting for completion of second operand


    function NumPressed (Num)

    {

    if (FlagNewNum)

        {

    FKeyPad.ReadOut.value  = Num;

            FlagNewNum = false;

        }

        else

        {

            if (FKeyPad.ReadOut.value == "0")

                FKeyPad.ReadOut.value = Num;

            else

                FKeyPad.ReadOut.value += Num;

        }

    }


    function Operation (Op)

    {

        var Readout = FKeyPad.ReadOut.value;

        //alert( 'op' );

        if (FlagNewNum && PendingOp != "=");

            // User is hitting op keys repeatedly, so don't do anything

        else

        {

            //alert( PendingOp );

            FlagNewNum = true;

            if ( '+' == PendingOp )

                Accum += parseFloat(Readout);

            else if ( '-' == PendingOp )

                Accum -= parseFloat(Readout);

            else if ( '/' == PendingOp )

                Accum /= parseFloat(Readout);

            else if ( '*' == PendingOp )

                Accum *= parseFloat(Readout);

            else

                Accum = parseFloat(Readout);


            FKeyPad.ReadOut.value = Accum;

            PendingOp = Op;

        }

    }


    function Decimal ()

    {

        var curReadOut = FKeyPad.ReadOut.value;


        if (FlagNewNum)

        {

            curReadOut = "0.";

            FlagNewNum = false;

        }

        else

        {

            if (curReadOut.indexOf(".") == -1)

                curReadOut += ".";

        }

        FKeyPad.ReadOut.value = curReadOut;

    }


    function ClearEntry ()

    {

        // Remove current number and reset state

        FKeyPad.ReadOut.value = "0";

        FlagNewNum = true;

    }


    function Clear ()

    {

        // Clear accumulator and pending operation, and clear display

        Accum = 0;

        PendingOp = "";

        ClearEntry();

    }


    function Neg ()

    {

        FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1;

    }


    function Percent ()

    {

        FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accum);

    }


//-->

</script>


<br><br>

</font>



<br><p>

<font face="verdana, arial, helvetica" size="1" align="RIGHT" color="#808080">

<i>Last updated: <!--$$JustDate:-->  1/04/00 <!-- $--></i>

</font></p>

</table>

</body></html>


Sabtu, 03 Januari 2026

Dynamic HTML

 

Dynamic HTML

Internet Development Index

Dynamic HTML (DHTML) is a set of innovative features in Microsoft® Internet Explorer 4.0. By enabling authors to dynamically change the rendering and content of a document, DHTML gives authors the ability to create visually outstanding HTML documents that interact with the user without the burden of relying on server-side programs or complicated sets of HTML pages to achieve special effects.

With DHTML, you can easily add effects to your documents that previously were difficult to achieve. For example, you can:

  • Hide text and images in your document and keep this content hidden until a given time elapses or the user interacts with the page.
  • Animate text and images in your document, independently moving each element from any starting point to any ending point, following a path that you choose or that you allow the user choose.
  • Create a ticker that automatically refreshes its content with the latest news, stock quotes, or other data.
  • Create a form and then instantly read, process, and respond to the data the user enters in the form.

DHTML achieves these effects by modifying the current document and automatically reformatting and re-displaying the document to show changes. It does not need to reload the document or load a new document, or require a distant server to generate new content. Instead, it uses the power of the user's computer to calculate and carry out changes. This means a user does not have to wait for text and data to complete time-consuming roundtrips to and from a server before seeing results. Furthermore, DHTML does not require additional support from applications or embedded controls to make changes. Typically, DHTML documents are self-contained, using styles and a little script to process user input and directly manipulate the HTML tags, attributes, styles, and text in the document.

The HTML elements, attributes, and styles in DHTML are based on existing HTML and Cascading Style Sheets (CSS) specifications. Users can view your documents whether they use Internet Explorer 4.0 or later. Naturally, the dynamic and interactive features that you add to your documents might not be fully functional when viewed with a browser that does not support DHTML. But DHTML is designed to "degrade gracefully"—if you follow some basic guidelines, the content of your document can be viewable in other browsers.

DHTML works well with applications, Microsoft ActiveX® Controls, and other embedded objects. You can use existing applications and controls, or create new ones that specifically take advantage of the features of DHTML. Applications and controls work best when you rely on them to perform computationally difficult tasks, and use DHTML to display output and process user input. For example, you can create a document that allows the user to query, display, and modify the content of a large, server-based database by combining the data binding features of DHTML with a data source object (DSO). The DSO retrieves and sets data in a database, and DHTML does the rest: it processes user queries, displays the data, carries out and performs the necessary interaction with the object.

In short, DHTML eliminates the shortcomings of previous browser technologies. You can create innovative Web sites, whether on the Internet or an intranet, without having to sacrifice performance for interactivity and special effects. Not only does DHTML enhance the user's perception of your documents, it also improves server performance by reducing requests to the server and, subsequently, server load.

Microsoft is working with Internet standards bodies, such as the World Wide Web Consortium (W3C), to provide the best standards-based solutions to make the Web a better open environment for building efficient and interactive multimedia content. DHTML is the next step in that effort—all the HTML and CSS extensions for DHTML conform to W3C specifications or have been submitted to the W3C for consideration.

The following sections describe DHTML in more detail and how to use it.

Dynamic Styles

Dynamic styles are a key feature of DHTML. By using styles and style sheets, you can quickly change the appearance and formatting of elements in a document without adding or removing elements. This helps keep your documents small and the scripts that manipulate the document fast.

The object model provides programmatic access to styles. This means you can change inline styles on individual elements and change style rules in a document's CSS using simple script-based programming. These scripts can be written in Microsoft JScript® or Microsoft Visual Basic® Scripting Edition (VBScript).

Inline styles are CSS style assignments that have been applied to an element using the style attribute. You can examine and set these styles by retrieving the style object for an individual element. For example, if you want to highlight the text in a heading when the user moves the mouse pointer over it, you can use the heading's inline style to enlarge the font and change its color, as shown in the following simple example.

<HTML>
<HEAD><TITLE>Dynamic Styles</TITLE>
<SCRIPT LANGUAGE="JScript">
function doChanges() {
    window.event.srcElement.style.color = "green";
    window.event.srcElement.style.fontSize = "20px";
}
</SCRIPT>
<BODY>
<H3 ID=heading onmouseover="doChanges()" STYLE="color:black;font-size:18">Welcome to Dynamic HTML!</H3>
<P>You can do the most amazing things with the least bit of effort.
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

In the preceding example, the process (also known as an event handler) that responds when the onscreen cursor moves over an HTML tag that contains an onmouseover statement receives control when the user first moves the mouse pointer into the heading (known as an event). The handler uses the srcElement property of the event object to determine which element is the source of the event—in this case, the H3 element. It then uses the color and fontSize properties of the style object for the element to change the color and font size. Setting these properties changes the CSS color and font-size attributes given in the style attribute for the heading, and the browser immediately updates the onscreen text to display these new attribute values.

By using styles, you can create a simple document, such as the following, in which all items in a bulleted list are hidden until the user clicks the mouse.

<HTML>
<HEAD><TITLE>Dynamic Styles</TITLE>
<SCRIPT LANGUAGE="JScript">
function showMe() {
    MyHeading.style.color = "red";
    MyList.style.display = "";
}
</SCRIPT>
<BODY onclick="showMe()">
<H3 ID=MyHeading>Welcome to Dynamic HTML!</H3>
<P>You can do the most amazing things with the least bit of effort. Just click and see!
<UL ID=MyList STYLE="display:none">
<LI>Change the color, size, and typeface of text
<LI>Show and hide text
<LI>And much, much more
</UL>
<P>And this is just the beginning!
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

In the preceding example, the CSS display attribute is set to none, causing the ul list to be hidden from view. When the user clicks the document, the event handler clears the value of this attribute, making the browser display the list onscreen. Notice how any content that comes after the list shifts to accommodate the new text rendering.

Dynamic styles are based on the World Wide Web Consortium Non-Microsoft link Recommendation for Cascading Style Sheets (CSS) Non-Microsoft link specification for static style sheets. For a list of topics that describe and explain dynamic styles in full detail, see Dynamic Styles.

Dynamic Content

With DHTML, you can change the content of a document after it is loaded. Internet Explorer provides a rich set of properties and methods to dynamically construct and alter documents, from inserting and deleting elements to modifying the text and attributes in individual elements.

The DHTML Document Object Model (DOM) provides access to all elements in the document. Consider the following simple document. You can replace and change elements as well as change colors and text by using a few lines of script.

<HTML>
<HEAD><TITLE>Welcome!</TITLE>
<SCRIPT LANGUAGE="JScript">
function changeMe() {
    MyHeading.outerHTML = "<H1 ID=MyHeading>Dynamic HTML!</H1>";
    MyHeading.style.color = "green";
    MyText.innerText = "You can do the most amazing things with the least bit of effort.";
    MyText.align = "center";
    document.body.insertAdjacentHTML("BeforeEnd", "<P ALIGN=\"center\">Just give it a try!</P>");
}
</SCRIPT>
<BODY onclick="changeMe()">
<H3 ID=MyHeading>Welcome to Dynamic HTML!</H3>
<P ID=MyText>Click anywhere on this page.</P>
</BODY>
</HTML>

This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

When the user clicks on the page in the preceding example, the script replaces the H3 element with an H1 element, centers the paragraph, and inserts a new paragraph at the end of the document. Using script in this way, you can add, delete, and replace any elements and text in the document.

For a list of topics that describe and explain dynamic content in full detail, see Dynamic Content.

Positioning and Animation

Positioning is the ability to place an HTML element at a specific point in a document by assigning an x- and y-coordinate and a z-plane to that element. This means you can place elements—images, controls, and text—exactly where you want them and achieve special, overlapping effects by defining in what order elements at the same point should be stacked atop one another.

Positioning is an extension of CSS. This means that you set the position of an element by setting the appropriate CSS attributes for that element. The following example shows how to set the absolute position of an image.

<HTML>
<HEAD><TITLE>Positioning</TITLE>
<BODY>
<H3>Welcome to Dynamic HTML!</H3>
<P>With positioning, you can place images exactly where you want them, even behind text and other images.
<IMG STYLE="position:absolute;top:0; left:0; z-index:-1" SRC="banner.gif">
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

In the preceding example, the image is placed at the document's top left corner. Setting the z-index attribute to -1 causes the image to be placed behind the text on the page.

Internet Explorer 4.0 supports positioning and animation of elements even after a document is loaded. Because the DOM provides access to styles and style sheets, you can set and change the position of an element as simply as you set and change its color. This makes it especially easy to change the position of elements based on how the user is viewing the document, and even to animate the elements. For animation, all you need is to slightly modify the position of an element on some interval. The following example presents an image that glides across the top of the document and comes to rest at the upper-left corner.

<HTML>
<HEAD><TITLE>Dynamic Positioning</TITLE>
<SCRIPT LANGUAGE="JScript">
var id;
function StartGlide()
{
    Banner.style.pixelLeft =
    document.body.offsetWidth;
    Banner.style.visibility = "visible";
    id = window.setInterval("Glide()",50);
}
function Glide()
{
    Banner.style.pixelLeft -= 10;
    if (Banner.style.pixelLeft<=0) {
        Banner.style.pixelLeft=0;
        window.clearInterval(id);
    }
}
</SCRIPT>
<BODY onload="StartGlide()">
<H3>Welcome to Dynamic HTML!</H3>
<P>With dynamic positioning, you can move images anywhere in the document 
even while the user views the document.
<IMG ID="Banner" STYLE="visibility:hidden;position:absolute;top:0; left:0; z-index:-1" 
SRC="banner.gif">
</BODY>
</HTML>

This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

In the preceding example, the StartGlide function is called when the document is loaded. The function sets the absolute position of the Banner image to the top, far-right edge of the document body, shows the image, and starts an interval. The Glide function is called repeatedly in 50-millisecond intervals. The function moves the image to the left by 10 pixels, and when the image is finally at the left edge, it cancels the interval.

Dynamic positioning has many uses in consumer and business applications. By combining dynamic styles, positioning, transparent images, and transparent ActiveX Controls, you can present a rich set of animation effects in your documents.

Dynamic positioning and animation is based on the W3C Working Draft on Positioning HTML with Cascading Style Sheets Non-Microsoft link and will be adapted, as needed, to conform to the final recommendation. Documents that use positioning will be compatible with browsers that support this standard.

For a list of topics that describe and explain CSS positioning in full detail, see Positioning.

Filters and Transitions

Internet Explorer 4.0 supports an extensible architecture that enables you to specify filters and transitions using CSS properties. Visual filters can be used to apply visual effects to an element without requiring any scripts. The syntax is:

filter: filter_name( param1, param2, ...)

Transitions are effects that can be applied when changing the display of an element—switching from one image to another, for example. Both interpage transitions and transitions on specific elements within a page are supported. Transitions are most commonly seen in "slide show" presentations. Filters are effects, such as text drop shadows, that can be applied to content on Web pages. In addition to the set of standard filters and transitions included in Internet Explorer 4.0 , the standard filters and transitions can be supplemented by additional third-party filters and transitions. For more information about filters, see Creating Multimedia Effects with Visual Filters and Transitions.

Font Download

Internet Explorer 4.0 supports the use of dynamically downloaded fonts. Using the @font-face style attribute , a document can reference a font that is automatically downloaded, is used for the page only, and is discarded once the page is no longer displayed. The following example shows the use of downloaded fonts.

<HTML><HEAD>
<STYLE>@font-face {font-family:comic; src:url(http://abc.domain.com/fonts/comicbold.eot);}
</STYLE>
</HEAD>
<BODY>
<P STYLE="font-family:comic;font-size:18pt">this line uses the @font-face 
style element to display this text using the Comic Sans MS font in 18-point 
size and bold.
<P>
</BODY></HTML>

Data Binding

Data binding is a DHTML feature that lets you easily bind individual elements in your document to data from another source, such as a database or comma-delimited text file. When the document is loaded, the data is automatically retrieved from the source and formatted and displayed within the element.

One practical way to use data binding is to automatically and dynamically generate tables in your document. You can do this by binding a table element to a data source. When the document is viewed, a new row is created in the table for each record retrieved from the source, and the cells of each row are filled with text and data from the fields of the record. Because this generation is dynamic, the user can view the document while new rows are created in the table. Additionally, once all the table data is present, you can manipulate (sort or filter) the data without requiring the server to send additional data. The table is simply regenerated, using the previously retrieved data to fill the new rows and cells of the table.

Another practical use of data binding is to bind one or more elements in the document to specific fields of a given record. When the document is viewed, the elements are filled with text and data from the fields in that record, sometimes called the "current" record. A simple example is a form letter in which the name, e-mail address, and other details about an individual are filled from a database. To adapt the letter for a given individual, you simply specify which record should be the current record. No other changes to the letter are needed.

Yet another practical use is to bind the fields in a form to fields in a record. Not only can the user view the content of the record, but the user can also change that content by changing the settings and values of the form. The user can then submit these changes so that the new data is uploaded to the source—for example, to the HTTP server or database.

To provide data binding in your documents, you must add a DSO to your document. This invisible object is simply an ActiveX control or Java applet that knows how to communicate with the data source. Microsoft provides two DSOs with Internet Explorer 4.0: one to access comma-delimited data in text files and another to access Structured Query Language (SQL) data in SQL Server and other Open Database Connectivity (ODBC) sources. Additional DSOs, such as a JDBC data source, will also be available from Microsoft and third parties.

The following example shows how easy it is to bind to a data source. When viewed, this example displays the first three fields from all the comma-delimited records of the file "sampdata.csv" in a clear, easy-to-read table.

<HTML>
<BODY>
<OBJECT CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" ID=sampdata>
   <PARAM NAME="DataURL" VALUE="sampdata.csv">
   <PARAM NAME="UseHeader" VALUE="True">
</OBJECT>
<TABLE BORDER=1 DATASRC="#sampdata">
<THEAD>
<TR><TH>First Field<TH>Second Field<TH>Third Field
<TBODY>
<TR><TD><SPAN DATAFLD=A></SPAN><TD><SPAN DATAFLD=B></SPAN><TD><SPAN DATAFLD=C></SPAN>
</TABLE>
</BODY>
</HTML>

This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

For a list of topics that describe and explain data binding in full detail, see Data Binding.

DHTML Object Model

The DOM is the foundation of DHTML, providing the interface that allows scripts and components to access DHTML features.

Using the DOM, you can access and manipulate virtually anything within the document. The HTML elements in the document are available as individual objects, meaning you can examine and modify an element and its attributes by reading and setting properties and by calling methods. The text is available through properties and methods on the elements.

The object model also makes user actions—such as pressing a key and clicking the mouse—available as events. You can intercept and process these and other events by creating event handler functions and routines. The event handler receives control each time a given event occurs and can carry out any appropriate action, including using the object model to change the document.

The following example shows how to use the object model to modify a document. This example changes the color of the heading and adds a line of text when the user clicks the mouse in the document.

<HTML>
<HEAD><TITLE>Welcome!</TITLE>
<SCRIPT LANGUAGE="JScript">
function changeMe() {
    MyHeading.style.color = "green";
    MyText.innerText = "You can do the most amazing things with the least bit of effort.";
}
</SCRIPT>
<BODY onclick="changeMe()">
<H3 ID=MyHeading>Welcome to Dynamic HTML!</H3>
<P ID=MyText>Click anywhere in this document.</P>
</BODY>
</HTML>

This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

The preceding example contains an event handler, named changeMe, that processes mouse clicks for the document. The handler uses the all collection of the document object to pick out the H3 and p elements using their ID values. It changes the color of the heading by setting the color property of the STYLE object for that element. It replaces the text in the paragraph by setting the innerText property.

The object model is a superset of the JavaScript Object Model found in Netscape Navigator. This means that portions of the model are compatible with other browsers, even if they do not support DHTML. By following basic guidelines, you can write scripts that take full advantage of the object model when run in Internet Explorer and that provide reasonable results when run in browsers that do not support DHTML.

For lists of topics describing important aspects of the object model, see Working with Windows, Frames, and Dialog BoxesScripting with Elements and Collections; and Understanding the Event Model.

For a complete listing of the objects, properties, methods, collections, and methods of the object model, see DHTML References.

Related Topics

Jumat, 02 Januari 2026

Create Tab with JAVASCRIPT

 




<HTML>

<HEAD>

<TITLE>All In One Example</TITLE>

<STYLE> 


INPUT { position: absolute; background-color: transparent;  }

SPAN { position: absolute; text-align: right; font: bolder 7pt Arial; 

background-color: white; color: "#B3B3B3";

letter-spacing: 1px; padding-right: 4px; height: 22px}

BODY { background-color:cyan }

DIV { position: absolute }

BUTTON { position: absolute }


#divInfoUser { top: 5px; left: 5px; width: 440px; height: 100px }

#fdsInfo { top: 0px; left: 0px; width: 440px; height: 100px }


.clsLogin { top: 20px; left: 7px;   width: 138px }

.clsFirstName { top: 20px; left: 146px; width: 142px }

.clsLastName { top: 20px; left: 289px; width: 142px }  


.clsComment { top: 44px; left: 7px;   width: 424px }  

.clsPassword { top: 68px; left: 7px;   width: 213px }  

.clsRePassword { top: 68px; left: 221px; width: 210px }  


#divUserType { top: 105px;left: 5px;  width: 441px; height: 60px }

#fdsUserType { top: 0px;  left: 0px;  width: 441px; height: 60px }


#optDeveloper { top: 25px;  left: 10px; }

#optSupport             { top: 25px;  left: 155px; }

#optAdministrator { top: 25px;  left: 300px; }


#divDeveloper { top: 26px;  left: 32px }

#divSupport             { top: 26px;  left: 177px }

#divAdministrator { top: 26px;  left: 322px }


#btnSubmit { top: 180px; left: 155px }

#btnReset { top: 180px; left: 225px }


#ifrmDestFrame { position: absolute; visibility: hidden }



#trTabList { cursor: hand; text-align: center; font: 10pt Arial; height:20px; }

#tdLeftSide { border-left:1px THREEDHIGHLIGHT solid; }

#tdRightSide { border-right: 1px THREEDDARKSHADOW solid;}


.clsTab { border-top: 1px solid THREEDHIGHLIGHT; 

border-right: 1px THREEDDARKSHADOW solid;

border-left: 1px THREEDHIGHLIGHT solid;}

.clsTabSel { border-top: 2px THREEDHIGHLIGHT solid; 

border-right: 1px THREEDDARKSHADOW solid;

border-left: 1px THREEDHIGHLIGHT solid; }

.clsTabSelLeft { border-top: 1px THREEDHIGHLIGHT solid;

border-left: 1px THREEDHIGHLIGHT solid;

border-right: 1px THREEDHIGHLIGHT solid;}

.clsTabSelRight { border-top: 1px THREEDHIGHLIGHT solid; 

  border-right: 1px THREEDDARKSHADOW solid; 

  border-left: 1px THREEDDARKSHADOW solid; }

.clsTabContent { border-top:1px THREEDHIGHLIGHT solid; padding:1px;}


.clsTabContentSel { border-top: none; padding:1px; }


#tblTabControl { position : absolute; top: 5px; left: 5px; width: 460px; height: 240px; 

background: BUTTONFACE ; 

border-bottom: 1px THREEDDARKSHADOW solid; } 



#divInfo { position : absolute; top: 30px; left: 10px; width: 430px; height: 250px; 

}


#divMore { position : absolute; top: 30px; left: 10px; width: 430px; height: 250px; 

text-align: center; color: brown; visibility: hidden; }


</STYLE>


<SCRIPT language="JAVASCRIPT">

// intNumTabs : number of tabs in the control

// intCurrentTab : currently selected tab

var intNumTabs = 2, intCurrentTab = 0


function onClickTab()

{

// check if it's the TD element event (the TR will buddble down to TD)

if ("TD"==event.srcElement.tagName) 

{

   // check if it's not the same tab that was already selected

   if (event.srcElement.cellIndex != intCurrentTab) 

{

   setTab(event.srcElement.cellIndex)

}

}

}


function setTab(newTab)

{

  // call the onLeave event of the currently selected tab

  switch (intCurrentTab) 

case (0):

onLeaveInfo();

break; 

case (1):

onLeaveMore();

break; 

}


var tblTabControl = document.all.tblTabControl


// assign the new tab to the current tab variable

intCurrentTab = newTab;


// Loop through each tab to change the appearance (class)

for (var i = 0; i <= intNumTabs; i++)

{

   switch (i)

   {

   // tab to the left

   case (newTab - 1):

   tblTabControl.rows(0).cells(i).className = "clsTabSelLeft"

   tblTabControl.rows(1).cells(i).className = "clsTabContent"

   break;


   // tab to the right

   case (newTab + 1):

   if (i != intNumTabs)

   {

tblTabControl.rows(0).cells(i).className = "clsTabSelRight";

tblTabControl.rows(1).cells(i).className = "clsTabContent"

   }

   break;


   // tab itself

   case (newTab):

   tblTabControl.rows(0).cells(i).className = "clsTabSel";

   tblTabControl.rows(1).cells(i).className = "clsTabContentSel";

   break;


   // all other tabs

   default:

   if (i != intNumTabs)

{

  tblTabControl.rows(0).cells(i).className = "clsTab";

  tblTabControl.rows(1).cells(i).className = "clsTabContent";

}

   break;

}

}


  // call the onEnter of the newly selected tab

  switch (newTab) 

case (0):

onEnterInfo();

break; 

case (1):

onEnterMore();

break; 

}

}



function onEnterInfo()

{

document.all.divInfo.style.visibility = "visible"

}


function onEnterMore()

{

document.all.divMore.style.visibility = "visible"

}


function onLeaveInfo()

{

document.all.divInfo.style.visibility = "hidden"

}


function onLeaveMore()

{

document.all.divMore.style.visibility = "hidden"

}


</SCRIPT>


<SCRIPT language="VBSCRIPT">

Sub SubmitComplete()


alert("Submit completed")

document.all.frmUser.reset()


End Sub

</SCRIPT>


</HEAD>


<BODY bgcolor="cyan">

<TABLE id=tblTabControl cellspacing=0>

<TR id=trTabList onclick="onClickTab()" onSelectStart="onClickTab(); return false;">

<TD class=clsTabSel style="width:70">Info</TD>

<TD class=clsTabSelRight style="width:70">More</TD>

<TD onclick="event.cancelBubble=true" 

onselectstart="event.cancelBubble=true" style="cursor:default"></TD>

</TR>

<TR>

<TD id=tdLeftSide class=clsTabContentSel></TD>

<TD class=clsTabContent></TD>

<TD id=tdRightSide class=clsTabContent></TD>

</TR>

</TABLE>


<DIV id=divInfo>

<FORM id=frmUser action="UserSubmit.asp" method=POST target=ifrmDestFrame> 

<DIV id=divInfoUser>

<FIELDSET id=fdsInfo>

<LEGEND>User Info</LEGEND> 

<SPAN id=spanLogin class=clsLogin>Login</SPAN>

<INPUT type=text id=txtLogin class=clsLogin name=txtLogin>


<SPAN id=spanFirstName class=clsFirstName>First Name</SPAN>

<INPUT type=text id=txtFirstName class=clsFirstName name=txtFirstName>


<SPAN id=spanLastName class=clsLastName>Last Name</SPAN>

<INPUT type=text id=txtLastName class=clsLastName name=txtLastName>


<SPAN id=spanComment class=clsComment>Comment</SPAN>

<INPUT type=text id=txtComment class=clsComment name=txtComment>


<SPAN id=spanPassword class=clsPassword>Password</SPAN>

<INPUT type=password id=txtPassword class=clsPassword name=txtPassword>


<SPAN id=spanRePassword class=clsRePassword>Re-enter Password</SPAN>

<INPUT type=password id=txtRePassword class=clsRePassword name=txtRePassword>

</FIELDSET>

</DIV>

<DIV id=divUserType>

<FIELDSET id=fdsUserType>

<LEGEND>User Type</LEGEND> 

<DIV id=divDeveloper>

<LABEL id=lblDeveloper for=optDeveloper>Developer</LABEL>

</DIV>

<INPUT id=optDeveloper name=optType type=radio checked>


<DIV id=divSupport>

<LABEL id=lblSupport for=optSupport>Support</LABEL>

</DIV>

<INPUT id=optSupport name=optType type=radio>


<DIV id=divAdministrator>

<LABEL id=lblAdministrator for=optAdministrator>Administrator</LABEL>

</DIV>

<INPUT id=optAdministrator name=optType type=radio>


</FIELDSET>

</DIV>


<BUTTON id=btnSubmit onClick="frmUser.submit()">Submit</BUTTON>

<BUTTON id=btnReset onClick="frmUser.reset()">Reset</BUTTON>


</FORM>

</DIV>


<DIV id=divMore>

Tab More's content goes here.

<H1>Dudi Gunawan</H1>

</DIV>


<IFRAME id=ifrmDestFrame name=ifrmDestFrame src=""></IFRAME>


</BODY>

</HTML>