Je vais essayer de donner un extrait le plus complet possible de la page du client :
<html ...>
<head>
<script type= "text/JavaScript">
<!--
....
//-->
</script>
</head>
<form id="SubmitForm" name="SubmitForm" method="post" action="#">
<td class="DataName" width="35%">
Choix document
</td>
<td class ="CellWithNoBorder">
<SCRIPT type="text/javascript">
<!--
...
function PollPartList (doDrop)
{
if (!gPTO_PartListWnd_test || gPTO_PartListWnd_test.closed) {
var form = parent.frames ["PackageForm"].document.forms [0] ;
var guid = "OTI;" + gPTO_SearchPartDef + ";" + form.elements [gPTO_SearchFieldId].value ;
if (gPTO_SearchWasSelect) {
var cbo = form.elements ["CBO_" + gPTO_SearchFieldId] ;
var i, newidx ;
for (i = 0 ; i < cbo.options.length ; i++) {
if (cbo.options [i].value == guid) {
newidx = i ;
break ;
}
}
cbo.selectedIndex = newidx ;
}
window.clearInterval (gPTO_PartListTimer) ;
UpdatePTODropFields (gPTO_SystemId, gPTO_ResourceId, guid, doDrop) ;
}
}
/*
* Displays the part list window.
*/
function PopupPartList (sysid, resid, sessid, fieldid, partdef, isselect, doDrop)
{
var location = "
http://srvadvitium/Advitium/" + "OpenPTO.asp?";
location = location + "SystemId={1DF04761-2CE1-4DCB-9005-AEDFFE2E3233}";
location = location + "&ResourceId={F6168319-B6A5-450A-837E-B30626D8127E}";
location = location + "&SessionId={C6AA94E4-72C3-4789-A6AA-A473A95E4C02}" ;
location = location + "&Entity=Part&EntityDefGUID=OTD;" + EncodeString (partdef);
location = location + "&FieldId=" + EncodeString (fieldid) + "&IsMulti=0&IsId=1" ;
gPTO_SystemId = sysid ;
gPTO_ResourceId = resid ;
gPTO_SearchFieldId = fieldid ;
gPTO_SearchPartDef = partdef ;gPTO_SearchWasSelect
(isselect "SELECT") ;
gPTO_PartListWnd_test = window.open (location, "PTO", "status=0,width=640px,height=300px,resizable=1,scrollbars=1") ;
if (doDrop != 'False')
gPTO_PartListTimer = window.setInterval ("PollPartList ('True')", 100);
else
gPTO_PartListTimer = window.setInterval ("PollPartList ('False')", 100);
}
...
//-->
</SCRIPT>
,
</html>
Je ne sais pas si ça va etre utile! on retrouve la fonction fun1
PopupPartList et fun2
PollPartList