APEX 版本:4.1.1.00.23
我有一个穿梭车,它根据从选择列表中选择的内容填充正确的站点。每当从选择列表中选择一个项目时,右侧面板上都会填充正确的一个或多个项目,但始终会添加一个空值。我如何获得空乘?
Shuttle 名称:P51_Shuttle 选择列表名称:P51_Analyst
这是我的代码: HTML 标头:
<script type="text/javascript">
function LoadRightPane()
{
var objDQAnalyst = document.getElementById("P51_DQ_ANALYST");
var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=get_DQAttributes',0);
ajaxRequest.add('P51_DQ_ANALYST',objDQAnalyst.value);
ajaxResult = ajaxRequest.get();
//alert(ajaxResult);
if(ajaxResult)
{
var shuttleRight = document.getElementById("P51_SHUTTLE_RIGHT");
shuttleRight.options.length = 0;
var attrArray = ajaxResult.split("~colsep~");
for(var i=0; i < attrArray.length; i++) {
shuttleRight.options[i] = new Option(attrArray[i], attrArray[i]);
}
}
else
{
shuttleRight.options.length = 0;
}
ajaxRequest = null;
}
function moveitem(item) {
return;
s_left = document.getElementById("P51_SHUTTLE_TO_LEFT");
db.transaction(function(tx){
tx.executeSql('select distinct DQ_ATTRIBUTE from DQ_MANUAL_EDIT where DQ_ANALYST = ?',[item],function(tx,results)
{
for (var i=0; i < s_left.options.length;i++)
{
if (results.value == s_left.options[i].value)
{
s_left.options[i].selected = true;
g_Shuttlep_v15.move();
}
}
});
});
}
</script>
页面 HTML 正文属性:
onLoad="Javascript:LoadRightPane();"
调用的应用程序/页面进程 (get_DQAttributes)
DECLARE
L_RETURN VARCHAR2(2000):= NULL ;
BEGIN
BEGIN
FOR rec IN (
select distinct dq_attribute
from DQ_MANUAL_EDIT
where dq_analyst = :P51_DQ_ANALYST
)
LOOP
L_RETURN := L_RETURN || rec.dq_attribute || '~colsep~' ;
END LOOP;
end;
htp.prn(L_RETURN);
END;