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.
{
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,