3.2.0

function with parms problem

function AddButton(strName, strLabel, strFunction, iSize)
{
var btnCode = new AW.UI.Button;
btnCode.setId(strName);
btnCode.setControlText(strLabel);
btnCode.onControlClicked = strFunction;
btnCode.setSize(iSize);

document.write(btnCode);
}

if I define the function the use inline code to create a button if I put params after the function it calls the function before adding the button.

<td><script language="JavaScript" type="text/javascript">AddButton("btnClear", "Clear", closeIFByName(),40)</script></td>
<td><script language="JavaScript" type="text/javascript"></script></td>

If I just put closeIFByName then it creates the button and does not call the function. However I want to add some params to the function call how can I do this.
Andy Steward
December 20,
ok
the code is written in nice manner create a closeIfByName is a syntax error since java script is case sensitive so try to do another way
write the code in the function that needs to close the objects u want and execute it i think it will work
vasu, rajesh
January 8,

This topic is archived.

See also:


Back to support forum