Client Attribute"
m |
m |
||
Line 12: | Line 12: | ||
</blockquote> | </blockquote> | ||
− | For example, suppose you want to listen to the <code>onload</code> event, and then you can do as follows. | + | For example, suppose you want to listen to the <code>onload</code> event, and then you can do as follows<ref>For more information, please refer to [[ZK Component Reference/Essential Components/Iframe#onload|ZK Component Reference: iframe]].</ref>. |
<source lang="xml"> | <source lang="xml"> | ||
Line 31: | Line 31: | ||
The other use of the client-attribute namespace is to specify attributes that are available only to certain browsers, such as accessibility and [http://www.section508.gov/index.cfm?FuseAction=Content&ID=12#Web Section 508]. | The other use of the client-attribute namespace is to specify attributes that are available only to certain browsers, such as accessibility and [http://www.section508.gov/index.cfm?FuseAction=Content&ID=12#Web Section 508]. | ||
+ | |||
+ | <blockquote> | ||
+ | ---- | ||
+ | <references/> | ||
+ | </blockquote> | ||
=Version History= | =Version History= |
Revision as of 08:59, 9 December 2010
Name: client attribute Namespace: http://www.zkoss.org/2005/zk/client/attribute Namespace shortcut: client/attribute
It is the reserved namespace for specifying client-side DOM attributes. Unlike the client namespace, which assigns something to widgets, the client/attribute namespace assigns additional DOM attributes to the DOM tree directly at the client.
Notice that if the widget's DOM output (Widget.redraw(Array)) also has the same DOM attribute, both of them will be generated and it is technically not legal. Thus, you shall prevent the DOM attributes that widget might output.
For example, suppose you want to listen to the onload
event, and then you can do as follows[1].
<iframe src="http://www.google.com" width="100%" height="300px"
xmlns:ca="client/attribute"
ca:onload="do_whater_you_want()"/>
If the attribute contains colon or other special characters, you can use the attribute
element as follows.
<div xmlns:ca="client/attribute">
<attribute ca:name="ns:whatever">
whatever_value_you_want
</attribute>
</div>
The other use of the client-attribute namespace is to specify attributes that are available only to certain browsers, such as accessibility and Section 508.
- ↑ For more information, please refer to ZK Component Reference: iframe.
Version History
Last Update : 2010/12/9
Version | Date | Content |
---|---|---|
5.0.3 | July 2010 | The client-attribute namespace was introduced. |