'defaults' Example : defaults « Javascript Objects « JavaScript Reference

JavaScript Reference
1. Event Handlers Reference
2. Javascript Collections
3. Javascript Methods
4. Javascript Objects
5. Javascript Properties
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
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
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
JavaScript Reference » Javascript Objects » defaults 
'defaults' Example

    
<html xmlns:yourNs>
<head>
<?import namespace="yourNs" implementation="yourHTC.htc"></head>
<body><div style= "color:red; 
                   font-size:20pt; 
                   font-Style:italic; 
                   border:2px solid blue">
<br>Sample text in the main document<br>
<yourNs:yourTagName></yourNs:yourTagName>
</div>
</body>
</html>

<!--
Contents of yourHTC.htc:
-->
<public:component tagName="yourTagName">
<attach event="oncontentready" onevent=contentReady() />
</public:component>
<script language="JavaScript"
function contentReady(){
    defaults.viewLink = document;
    defaults.viewInheritStyle = false;
    defaults.viewMasterTab = false
}
function inheritStyle() {
    boolInherit = defaults.viewInheritStyle;
    defaults.viewInheritStyle = true
}
</script>
<body>
<div id="extDiv" 
     style="font-size:20pt; font-weight:bold; border:3px solid green">
     Imported Document Text
</div>
<br>
<button onclick="inheritStyle();">Set Inheritance to True</button>
</body>

    
      
      
Related examples in the same category
1. 'defaults' Syntax and Note
2. 'defaults' Event Handlers
3. 'defaults' CSS Attributes and JavaScript Style Properties
4. 'defaults' JavaScript Properties
www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.