|
Listing 2: JavaScript for Page 1
<script type="text/javascript" language="JavaScript">
function popupNodeFinder ()
{
var url;
url = 'f?p=&APP_ID.:2:&SESSION.:::2,RP';
w = open(url,"winLov","Scrollbars=1,resizable=1,width=650,height=800,modal=yes");
if (w.opener == null)
w.opener = self;
w.focus();
}
function html_TogglePlusMinus(pThis, pValue)
{
if(html_CheckImageSrc(pThis,'plus'))
{
pThis.src = html_replace(pThis.src,'plus','minus');
var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=expandTree',0);
get.add('P1_BRANCH_ID',pValue);
gReturn = get.get();
}
else
{
pThis.src = html_replace(pThis.src,'minus','plus');
var get =
new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=contractTree',0);
get.add('P1_BRANCH_ID',pValue);
gReturn = get.get();
}
document.body.style.cursor = 'default';
}
function getTreeNode(pThis,pValue)
{
html_TogglePlusMinus(pThis, pValue);
if(html_GetElement('branch'+pValue))
{
html_ToggleElement('branch'+pValue);
}
else
{
var get =
new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=processClick',0);
get.add('P1_BRANCH_ID',pValue);
gReturn = get.get();
if (gReturn)
{
html_GetElement(pThis).parentNode.innerHTML += gReturn
}
get = null;
}
}
</script>
<style type="text/css">
.selected_node {
background-color: #CFDCCF;
height:18px;
}
.unselected_node {
height:18px;
}
</style>
|