Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

Use of cell/textbox

Good morning,

I'm kinda of new to the use of Sahi and despite my intensive researches I couldn't find out what am I doing wrong.

I've got the following GUI element that I wish to fill, then I'll loop to the following ones using rightOf and the other relatives coordinates.

<input name="BUCCO_OCC_001_BUCCO_DT_ACTE" class="INPUNN" value="" maxlength="8" size="8" onchange="checkOnChangeV2(this, 0, 8, /^[0-3][0-9][0-1][0-9][0-9][0-9][0-9][0-9]$|^(9){8}$|^-$/, '99999999', 0,'date JJMMAAAA');changeQuantite(this);record(this);copyLastValue('BUCCO',1, 'BUCCO_DT_ACTE');" onblur="checkOnBlur(this);" onfocus="this.onKeyPress=checkOnKeyPress;checkOnFocus(this);" onkeyup="checkOnKeyUpV2(event, this, 0, 8, /^[0-3][0-9][0-1][0-9][0-9][0-9][0-9][0-9]$|^(9){8}$|^-$/, '99999999', 0, 'date JJMMAAAA');" onkeypress="return checkOnKeyPress(event);" type="TEXT">

I've tried the following syntaxes, but only the first one is working. My problem is that my form is composed of mixes textbox, checkbox and select, so I'd need to use a generic _cell in order to create my loop.
_setValue(_textbox("BUCCO_OCC_001_BUCCO_DT_ACTE"), "01102014");
_setValue(_cell(0,"BUCCO_OCC_001_BUCCO_DT_ACTE"), "01102014");
_setValue(_cell("BUCCO_OCC_001_BUCCO_DT_ACTE"), "01102014");

How can I do it?

Answers

  • If I understand correctly, there are cells in which are the inputs?
    if yes, try accessing the inputs
    _cell($i).children[0]
    
    loop the $i and find out what kind of input you got

    this should work given the input is the first child

    Regards
    Wormi
Sign In or Register to comment.