en:user:gs3_sample_format_statements
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
en:user:gs3_sample_format_statements [2016/10/09 23:05] – [Using the javascript in the format statement] kjdon | en:user:gs3_sample_format_statements [2016/10/09 23:08] – [Using the javascript in the format statement] kjdon | ||
---|---|---|---|
Line 251: | Line 251: | ||
We will modify the third <td> element to display a human readable form. | We will modify the third <td> element to display a human readable form. | ||
- | During development, | + | During development, |
< | < | ||
Line 273: | Line 273: | ||
</ | </ | ||
- | Element ids need to be unique, so in this case we will use the document id (< | + | Element ids need to be unique, so in this case we will use the document id (**< |
- | <td id="< | + | **<td id="< |
- | To set an element' | + | To set an element' |
- | document.getElementById finds the specified element, and element.innerHTML = " | + | **document.getElementById** finds the specified element, and **element.innerHTML = " |
We set the text to be the result of calling our function on the filesize metadata. | We set the text to be the result of calling our function on the filesize metadata. | ||
- | One further tricky part. We want to write document.getElementById("< | + | One further tricky part. We want to write **document.getElementById("< |
- | i.e. document.getElementById(< | + | i.e. **document.getElementById(< |
- | + | ** | |
- | Greenstone provides a shorthand: < | + | Greenstone provides a shorthand: |
en/user/gs3_sample_format_statements.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1