Controlling MARQUEE Object Properties : Marquee « HTML « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Dojo toolkit
7. Event
8. Event onMethod
9. Ext JS
10. Form Control
11. GUI Components
12. HTML
13. Javascript Collections
14. Javascript Objects
15. Javascript Properties
16. jQuery
17. Language Basics
18. Mochkit
19. Mootools
20. Node Operation
21. Object Oriented
22. Page Components
23. Rico
24. Scriptaculous
25. Security
26. SmartClient
27. Style Layout
28. Table
29. Utilities
30. Window Browser
31. YUI Library
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
JavaScript DHTML » HTML » Marquee 
Controlling MARQUEE Object Properties

/*
JavaScript Bible, Fourth Edition
by Danny Goodman 

Publisher: John Wiley & Sons CopyRight 2001
ISBN: 0764533428
*/


<HTML>
<HEAD>
<TITLE>MARQUEE Object Properties</TITLE>
<SCRIPT LANGUAGE="JavaScript">
// one function does all!
function setMARQUEEAttr(select) {
    if (document.all && document.all.myMARQUEE) {
        var choice = select.options[select.selectedIndex].value
        if (choice) {
            document.all.myMARQUEE.setAttribute(select.name, choice)
        }
    }
}
</SCRIPT>
</HEAD>
<BODY>
<H1>MARQUEE Object Properties</H1>
<BR>
<HR>
<MARQUEE ID="myMARQUEE" WIDTH=400 HEIGHT=24>This is the MARQUEE element object
 you will be controlling.</MARQUEE>
<FORM>
<INPUT TYPE="button" VALUE="Start Marquee" onClick="document.all.myMARQUEE.start()">
<INPUT TYPE="button" VALUE="Stop Marquee" onClick="document.all.myMARQUEE.stop()">
<BR>
Select a behavior: 
<SELECT NAME="behavior" onChange="setMARQUEEAttr(this)">
    <OPTION></OPTION>
    <OPTION VALUE="alternate">Alternate</OPTION>
    <OPTION VALUE="scroll">Scroll</OPTION>
    <OPTION VALUE="slide">Slide</OPTION>
</SELECT>
<BR>
Select a background color: 
<SELECT NAME="bgColor" onChange="setMARQUEEAttr(this)">
    <OPTION></OPTION>
    <OPTION VALUE="red">Red</OPTION>
    <OPTION VALUE="green">Green</OPTION>
    <OPTION VALUE="blue">Blue</OPTION>
    <OPTION VALUE="#FA8072">Some Hex Triplet Value</OPTION>
</SELECT>
<BR>
Select a scrolling direction: 
<SELECT NAME="direction" onChange="setMARQUEEAttr(this)">
    <OPTION></OPTION>
    <OPTION VALUE="left">Left</OPTION>
    <OPTION VALUE="right">Right</OPTION>
    <OPTION VALUE="up">Up</OPTION>
    <OPTION VALUE="down">Down</OPTION>
</SELECT>
<BR>
Select a scroll amount: 
<SELECT NAME="scrollAmount" onChange="setMARQUEEAttr(this)">
    <OPTION></OPTION>
    <OPTION VALUE=4>4</OPTION>
    <OPTION VALUE=6>(Default)</OPTION>
    <OPTION VALUE=10>10</OPTION>
</SELECT>
<BR>
Select a scroll delay: 
<SELECT NAME="scrollDelay" onChange="setMARQUEEAttr(this)">
    <OPTION></OPTION>
    <OPTION VALUE=50>Short</OPTION>
    <OPTION VALUE=85>Normal</OPTION>
    <OPTION VALUE=125>Long</OPTION>
</SELECT>
</BODY>
</HTML>



           
       
Related examples in the same category
1. Marquee 'direction' Example
2. 'behavior' Example
3. 'trueSpeed' Example
4. 'scrollAmount' Example
5. 'scrollDelay' Example
6. Marquee 'start()' Example
7. Marquee 'stop()' Example
8. The blink and marquee Tags
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.