Protocols/MSNP/Activities/SDK/Techref/Developing/Docbody: Difference between revisions
Jump to navigation
Jump to search
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23: | <!-- Generated @ 08/12/2022 23:45:40 +01:00 using Anima's CHM converter based on techref/developing/docbody.htm --> | ||
{{Protocols/MSNP|section=Activities}} | {{Protocols/MSNP|section=Activities}} | ||
__NOTOC__= Document Body Basics = | __NOTOC__= Document Body Basics = | ||
The body of the document presents information in HTML format. A scripting language such as Microsoft® Visual Basic Scripting Edition (VBScript) or JavaScript can be used to change text, formatting, or graphics by manipulating the Document Object Model (DOM). Any element that has an <span class="clsAttribute">id </span> attribute, such as a <span class="clsTag"><span></span>, <span class="clsTag"><td></span>, or <span class="clsTag"><image></span> tag, can be referenced and manipulated by script. For more information on HTML page setup, see [[ | The body of the document presents information in HTML format. A scripting language such as Microsoft® Visual Basic Scripting Edition (VBScript) or JavaScript can be used to change text, formatting, or graphics by manipulating the Document Object Model (DOM). Any element that has an <span class="clsAttribute">id </span> attribute, such as a <span class="clsTag"><span></span>, <span class="clsTag"><td></span>, or <span class="clsTag"><image></span> tag, can be referenced and manipulated by script. For more information on HTML page setup, see [[Protocols/MSNP/Activities/SDK/GettingStarted|Getting Started]]. | ||
The following example shows one way to reference a span of text and change it by using the <span class="clsProperty">innerHTML</span> property. | The following example shows one way to reference a span of text and change it by using the <span class="clsProperty">innerHTML</span> property. |
Latest revision as of 22:45, 12 August 2022
Document Body Basics
The body of the document presents information in HTML format. A scripting language such as Microsoft® Visual Basic Scripting Edition (VBScript) or JavaScript can be used to change text, formatting, or graphics by manipulating the Document Object Model (DOM). Any element that has an id attribute, such as a <span>, <td>, or <image> tag, can be referenced and manipulated by script. For more information on HTML page setup, see Getting Started.
The following example shows one way to reference a span of text and change it by using the innerHTML property.
In the script area:
<script type="JavaScript"> <!-- // change a span of text samplename.innerHTML="Sample User"; </script> //-->
In the display area:
<span id="samplename">user name goes here</span>
The following example shows one way to reference an image and change its contents by using the src property.
In the script area:
<script type="JavaScript"> <!-- // preloader ImageA = new Image(); ImageA.src = "loading.jpg" // change image to say Loading... loadingprogress1.src=ImageA.src; </script> //-->
In the display area:
<img id="loadingprogress1" src="empty.gif">