Protocols/MSNP/Activities/SDK/Techref/Developing/Docbody: Difference between revisions
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
Animadoria (talk | contribs) (Created automatically by Anima Importer) |
||
Line 1: | Line 1: | ||
<!-- Generated @ 08/12/2022 23: | <!-- Generated @ 08/12/2022 23:43:05 +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 = |
Revision as of 22:43, 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 [[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 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">