Jump to content
Sign in to follow this  
kournikola

Clic on search button javascript

Recommended Posts

Hello

I have to validate some form in automatic mode

First step : login : ok

Second step : clic on search button which is in javascript...

I think i have to clic on rechercher.gif but it doesn't works

Javascript make problem...

Can anybody help me please

Here my source code

<tr>

<td class="label">Parties au contrat</td>

<td class="control">

<script language="Javascript">

function submitMulti9a05f56b93f9024bfa17815c6d40e23b() {

submitfrmSearch();

}

</script>

<select name="PARTIECONTRAT" multiple size="4" >

<a onmouseover="this.style.cursor='hand';" onclick="java script:openSearchPARTIECONTRAT();">

<img align="absbottom" src="images/icons/small/rechercher.gif" /></a>

</select><script language="Javascript">

function openSearchPARTIECONTRAT() {

var link = 'main?mod=home&act=listmultiple&tablename=R_CO_PARTIECONTRAT&fieldlib=CPC_LIBELLE&fieldid=CPC_ID&reltablename=&relfield=&relexternalkey=&label=Parties+au+contrat&frommodule=contrat&customformatter=com.legalsuite.form.DefaultComboValueFormatter&frmname=frmSearch&frmfield=PARTIECONTRAT&jsretour=submitMulti9a05f56b93f9024bfa17815c6d40e23b' ;

var sel = window.document.frmSearch.PARTIECONTRAT ;

var selected = '' ;

var first = true ; for( var i = 0 ; i < sel.options.length ; i++ ) {

var curopt = sel.options[ i ] ;

if( ! first ) {

selected += ';' ;

}else{

first = false ;

}

selected += curopt.value ;

}

link += '&selected=' + selected ;

popup( link, 600,310 ) ;

}

function prepareSubmitPARTIECONTRAT() {

var sel = window.document.frmSearch.PARTIECONTRAT ;

for( var i = 0 ; i < sel.options.length ; i++ ) {

var curopt = sel.options[ i ] ;

curopt.selected = true

}

}

</script>

<a onmouseover="this.style.cursor='hand';" onclick="java script:openSearchPARTIECONTRAT();">

<img align="absbottom" src="images/icons/small/rechercher.gif" /></a>

</td>

</tr>

In autoit i do this:

local $oForm = _IEFormGetObjByName($oIE, "frmSearch")

local $oloupe = _IEFormElementGetObjByName($oForm, "PARTIECONTRAT")

local $iScreenX = _IEPropertyGet($oloupe, "screenx")

local $iScreenY = _IEPropertyGet($oloupe, "screeny")

MouseClick("left",$iScreenX, $iScreenY)

This doesn't works...

Any ideas?

Thanks

Nico

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...