LANSA Handle Event with Debug Prompt

function mmHandleEvent(Proc,Func)
{
  var dbugDEV = prompt( "Enter Device Name for Debug Else leave blank"  );
  if(dbugDEV!="" )  document.LANSA.action+="+BDEBUG+"+dbugDEV+"+%20";
	   document.LANSA._PROCESS.value=Proc;
	   document.LANSA._FUNCTION.value=Func;
	   document.LANSA.submit();
}
LANSA JOBS
877 526 7220

LANSA Checkboxes in Expandable List

Must have _BLNAME before List and _BLEND at end. (1 underscore)

<input type=”hidden” name=”__ZZCHKUSER-<RDML MERGE=”&ROWNUM” FORMAT=4> D” value=”<RDML MERGE=”ZZCHKUSER”>” size=”1″ > (2 underscores )

This works. Field ZZCHKUSER is in Browselist that has *NOBICP

<input type=”hidden” name=”__ZZCHKUSER-<RDML MERGE=”&ROWNUM” FORMAT=4> D” value=”<RDML MERGE=”ZZCHKUSER”>” size=”1″ >

<input type=checkbox name=”mChkBoxQ<RDML MERGE=”LISTCOUNT”>” value=”” <RDML MERGE=ZZCHKNODE> onclick=”SetCBState(this, ‘__ZZCHKUSER-<RDML MERGE=”&ROWNUM” FORMAT=4> D’, ‘Y’, ‘N’)”></strong></td>

This is the stuff for the page component

<INPUT TYPE=”HIDDEN” NAME=”_BLNAME” VALUE=”X1BL01LST” SIZE=”10″>
<RDML MERGE=”&BLX1BL01LST”>
<INPUT TYPE=”HIDDEN” NAME=”_BLEND” VALUE=”X1BL01LST” SIZE=10>

This is the stuff for the list component

<!– Component START for B1ABSLST / MAM20080528 –>
<tr height=”20″ class='<RDML MERGE=”ZTRCOLOR”>’ >
<td align=”left”>
<A href=”JavaScript:document.LANSA.PLISTENTRY.value = ‘<RDML MERGE=”LISTCOUNT”>’; HandleEvent(‘<RDML MERGE=”*PROCESS”>’,'<RDML MERGE=”*FUNCTION”>’);”> <IMG src=”/IMAGES/ball_blue.gif” ALT=”Go To Account Bill Maintenance” BORDER=”0″></A>
<strong><RDML MERGE=”ZZNAM”></strong></td>
<td align=”left” class=”arial1blackbold”>  <strong> <RDML MERGE=”ZZACT”></strong></td>
<td align=”left” class=”arial1blackbold”><center>   <strong><RDML MERGE=”ZZCNT”></strong></center></td>
<td align=”right” class=”arial1blackbold”> <strong><input type=checkbox name=”mChkBoxL<RDML MERGE=”LISTCOUNT”>” value=”” <RDML MERGE=ZZCHKNODE> onclick=”blueBallsChk(this,<RDML MERGE=”LISTCOUNT”>)”></strong></td>
<td align=”right” class=”arial1blackbold”> <strong>

<input type=”hidden” name=”__ZZCHKUSER-<RDML MERGE=”&ROWNUM” FORMAT=4> D” value=”<RDML MERGE=”ZZCHKUSER”>” size=”1″ >

<input type=checkbox name=”mChkBoxQ<RDML MERGE=”LISTCOUNT”>” value=”” <RDML MERGE=ZZCHKNODE> onclick=”SetCBState(this, ‘__ZZCHKUSER-<RDML MERGE=”&ROWNUM” FORMAT=4> D’, ‘Y’, ‘N’)”></strong></td>
</tr>
<!– Component END for B1ABSLST / MAM20080506 –>

CALL me for LANSA jobs

Mark

877 526 7220

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;

}

}

}

Visual LANSA Editor Short Cuts

Position the current line on the top of the window Ctrl + T

Position the current line in the middle of the window Ctrl + M

Position the current line on the bottom of the window Ctrl + B

Toggle a tag on a line Ctrl + F2

Remove all tags Alt + F2

Jump to the previous tagged line Ctrl + Up Arrow

Jump to the next tagged line Ctrl + Down Arrow

Comment selected text Ctrl + W

Uncomment selected text Ctrl + Shift + W

Collapse blocks. This command blocks a level at a time.
If you keep collapsing the blocks, the entire code will
be collapsed, except for lines that are not in blocks. Ctrl + F9

Expand blocks. This command expands a level at the time Ctrl +F10

Collapse the block containing the line that has the focus Ctrl + Shift + F9

Expand the collapsed block that has the editor focus Ctrl + Shift + F10

Makes selection/next character upper case Alt + UpArrow

Makes selection/next character lower case Alt + DownArrow

Delete word right Ctrl + Delete

Delete word left Ctrl + BackSpace

Delete from current position to end of line Alt + Shift + L

Cut line and place it on clipboard Ctrl + L

Copy line and place it on clipboard Alt + Q

Copy selection or line Plus key in number pad

Copy selected text to the clipboard Ctrl + Insert

Paste text from the clipboard Shift + Insert

Copy selected text to the clipboard Ctrl + C

Cut selected text to the clipboard Ctrl + X

Paste text from the clipboard Ctrl + V

Extend/reduce selection to next part of statement Ctrl + Shift + RightArrow

Extend/reduce selection to start of previous part of statement Ctrl + Shift + LeftArrow

Block select to end of line Shift + End

Block select to start of line Shift + Home

Block select to start of file Ctrl + Shift + Home

Block select to end of file Ctrl + Shift + End

Block select to page down Shift + PageDown

Block select to page up Shift + PageUp

Block select part of statement Left Button double-click

Line selection Shift + UpArrow

Line selection Shift + DownArrow

Select all text Ctrl + A

Find text Ctrl + F

Replace text Ctrl + H

Find next F3

Find previous Shift + F3

Go to line Ctrl + G

The only reference to *NOBCIPT on the web, courtesy of Mark Mason

*Noxxxxx

 

The contents of this variable allows you to disable:

·         Borders around the browse list.

·         Column headings.

·         Selection image.

·         Borders around empty cells in the browse list.

To turn off any of the above features, you will need to define the variable as a Text variable. The content of the variable is then set to be:

*Noxxxxx

where xxxxx can be up to five characters, identifying the feature to disable.

If you want to disable the border around the browse list, specify a ‘B’ character.

If you want to disable the column heading in the browse list, specify a ‘C’ character.

If you want to disable the selection image, specify an ‘I’ character.

If you do not want a <table> HTML tag around your browse list, specify a ‘T’ character.

If you do not want borders displayed around empty cells in your browse list, specify a ‘P’ character.

Note that if you disable the selection image, none of the columns in the browse list will be hyperlinked, even though you have enabled LANSA for the Web to allow selection from any column in a browse list. For example, *NOB would switch borders off.

Good Javascript date compare

<html>
<head>
<title>Compare Dates</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<Script Language=Javascript>
function CompareDates()
{
var str1  = document.getElementById(“Fromdate”).value;
var str2  = document.getElementById(“Todate”).value;
var dt1   = parseInt(str1.substring(0,2),10);
var mon1  = parseInt(str1.substring(3,5),10);
var yr1   = parseInt(str1.substring(6,10),10);
var dt2   = parseInt(str2.substring(0,2),10);
var mon2  = parseInt(str2.substring(3,5),10);
var yr2   = parseInt(str2.substring(6,10),10);
var date1 = new Date(yr1, mon1, dt1);
var date2 = new Date(yr2, mon2, dt2);

if(date2 < date1)
{
alert(“To date cannot be greater than from date“);
return false;
}
else
{
alert(“Submitting …”);
document.form1.submit();
}
}

</Script>
</head>

<body bgcolor=”#FFFFFF” text=”#000000″>
<form name=”form1″ method=”post” action=””>
<input type=”text” name=”fromdate” id=”fromdate” value=”20/10/2005″>
<input type=”text” name=”todate” id=”todate” value=”19/10/2005″>
<input type=”button” value=”compare dates” onclick=”CompareDates()”>
</form>
</body>
</html>

LANSA Date Formats

Date Formats


Date Built-In Functions may use one or more of the following formats as arguments and/or return values. The relevant Built-In Function’s description tells you which format is used as arguments and/or return values.

Code

Format of Date

A

System date format

B

DDMMYY

C

DD/MM/YY

D

YYMMDD

E

YY/MM/DD

F

MMDDYY

G

MM/DD/YY

H

DDMMYYYY

I

DD/MM/YYYY

J

YYYYMMDD

K

YYYY/MM/DD

L

MMDDYYYY

M

MM/DD/YYYY

N

DDMMMYY (e.g. 03JUL87)

O

DDMMMYYYY (e.g. 03JUL1987)

P

DDxx MMMMMMMMM YY (e.g. 16TH SEPTEMBER 87)

Q

DDxx MMMMMMMMM YYYY (e.g. 16TH SEPTEMBER 1987)

R

DDD (e.g. MON, TUE, WED, etc).

S

DDDDDDDDD (e.g. MONDAY, TUESDAY, WEDNESDAY, etc).

T

DDDDDDDDDD (in selected language e.g. LLLLLLLLLL).

U

MMMMMMMMMM (in selected language e.g. LLLLLLLLLL).

V

8 digit system date format

W

YYMM

X

MMYY

Y

YYYYMM

Z

MMYYYY

1

CYYMMDD

Domains that are Works in Progress

http://zoolander.us
http://wreward.com
http://wpfl.info
http://wmaps.com
http://wgfl.info
http://webkinzfordummies.com
http://wdude.com
http://wdonor.com
http://vegasdir.com
http://ukjobs.us

Samples and Snipets to make a programmer’s day a little easier.


http://traveler-id.com
http://tifl.info
http://swimid.com
http://skater-id.com
http://sillytag.com
http://sillysticker.com
http://sillylogo.com
http://sifl.info
http://send-msg.com
http://sbfl.info
http://sabfl.com
http://rpbfl.info
http://recoveryid.us
http://recoveryid.org
http://recoveryid.net
http://recoveryid.mobi
http://realgroups.com
http://raffle-id.com
http://ppfl.info
http://pofl.info
http://pifl.info
http://pcfl.mobi
http://pcfl.info
http://pbfl.info
http://passportemail.com
http://owzd.com
http://orldir.com
http://opfl.info
http://oceanfrontsites.com
http://oceanfrontdeal.com
http://obfl.info
http://nsbfl.info
http://nbfl.info
http://myseacolony.com
http://mbfl.info

Home


http://maintheory.com
http://lwqb.com
http://lwfl.info
http://lunchbyte.com

Home Dark


http://lost-24.net
http://lost-24.com
http://londonjobs.us
http://lkfl.info
http://lansaonline.com
http://lansa.mobi
http://key-it-in.com
http://kbfl.info
http://jbfl.info
http://jaxdir.com
http://iwgb.com
http://itumble.com
http://iretard.com
http://imagekid.com
http://ilost.us
http://hhfl.info
http://hcfl.info
http://golfer-id.com
http://gcsfl.com
http://fwbfl.info
http://fpfl.info
http://floridaoceanfronthomes.com
http://flaglerjobs.com
http://flagler.tv
http://e3l.net
http://devscript.com
http://customer-id.com
http://crackerday.com
http://cityread.com

Contact


http://bloodygoodbloke.com
http://biker-id.com
http://bat-id.com
http://apple-id.com
http://ambazamba.com
http://abfl.info
http://4jl.com
http://4gl.biz
http://12i.us