The init-crash-script Element"
From Documentation
Chunfuchang (talk | contribs) (Created page with "{{ZKConfigurationReferencePageHeader}} '''Syntax:''' <init-crash-script>javascript function assigned to '''window.zkShowCrashMessage'''</init-crash-script> [Default: see cras...") |
Chunfuchang (talk | contribs) |
||
Line 7: | Line 7: | ||
[Since ZK 7.0.4] | [Since ZK 7.0.4] | ||
− | It specifies how to customize crash message when initiation by | + | It specifies how to customize crash message when initiation by writing a javascript function which is assigned to <code>window.zkShowCrashMessage</code>. |
+ | |||
For example, | For example, | ||
<source lang="xml" high="6" > | <source lang="xml" high="6" > | ||
Line 24: | Line 25: | ||
</source> | </source> | ||
* Line 6: User can get <code>window.zkErrorCode</code> for more manipulation. | * Line 6: User can get <code>window.zkErrorCode</code> for more manipulation. | ||
+ | |||
+ | <code>window.zkErrorCode</code> has 5 values: | ||
+ | # zk before mounting error | ||
+ | # zk mounting error | ||
+ | # zk after mounting error | ||
+ | # user script error | ||
+ | # server no response error | ||
=Version History= | =Version History= |
Revision as of 07:46, 13 November 2014
Syntax:
<init-crash-script>javascript function assigned to window.zkShowCrashMessage</init-crash-script>
[Default: see crashmsg.js] [Since ZK 7.0.4]
It specifies how to customize crash message when initiation by writing a javascript function which is assigned to window.zkShowCrashMessage
.
For example,
<client-config>
<init-crash-script><![CDATA[
window.zkShowCrashMessage = function () {
var h2 = '<h2 style="background: rgb(1,133,174); text-align: center; '
+ 'color: white; width: 700px; margin: 0 auto;">';
var msg = 'Ooooops!! zkErrorCode: ' + window.zkErrorCode;
h2 = h2 + msg + '</h2>';
document.body.style.background = 'rgb(1,133,174)';
document.body.innerHTML = h2;
}
]]></init-crash-script>
</client-config>
- Line 6: User can get
window.zkErrorCode
for more manipulation.
window.zkErrorCode
has 5 values:
- zk before mounting error
- zk mounting error
- zk after mounting error
- user script error
- server no response error
Version History
Version | Date | Content |
---|---|---|
7.0.4 | November, 2014 | ZK-2495: When ZK init page, the loading animation runs in a endless loop |