| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Mar | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
- CSS (2)
- Javascript (3)
- LANSA (21)
- SQL (8)
- Twitter API (1)
- Uncategorized (25)
- 8. March 2010: American Express is Suing Me
- 28. January 2010: So frackin hard
- 1. September 2009: Twitter API STREAM Filter
- 15. June 2009: DOS Commands that work on Windows XP
- 14. April 2009: TWEATER CHEATER IS BORN
- 14. April 2009: Windows Keyboard Short Cuts - ALT F4 is my Favorite
- 11. April 2009: SELECT_SQL Examples
- 30. January 2009: My Recovery ID Idea
- 29. January 2009: Test Program to See what LANSA Services are Licensed
- 11. January 2009: glossary
Using Checkboxes in a LANSA Browse list
If you want to use checkboxes in browse lists with their initial set checked, you will need to deploy the following technique. This technique is based on the preceding example.
<input type=”hidden” name=”__{field name}-<RDML MERGE=”&ROWNUM” FORMAT=4> D”
value=”<RDML MERGE=”{field name}” size=”{size}”>” />
<input type=”checkbox” name=”DUMMY” value=”<RDML MERGE=”{field name}”>”
onclick=”SetCBState(this, ‘__{field name}-<RDML MERGE=”&ROWNUM”
FORMAT=4> D’, ‘Y’, ‘N’)”
<RDML ONCONDITION=”{field name}”>
checked=”checked”
</RDML>
/>
{field name} is the name of the field you have defined in your DEF_LIST command. This {field name} is padded with trailing blanks to 10 characters.
Note that this technique uses the <RDML ONCONDITION> tag to determine the initial state of the checkbox.
This technique calls a different JavaScript function, SetCBState:
function SetCBState(obj, RFld, CY, CN)
{
var NumElements=document.LANSA.elements.length;
for (i=0; i<NumElements;i++)
{
if (document.LANSA.elements[i].name==RFld)
{
if (obj.checked) document.LANSA.elements[i].value=CY
else document.LANSA.elements[i].value=CN;
break;
}
}
}
Leave a Reply
You must be logged in to post a comment.