但在BIRT 2.3的Release Note指出, 該版確實是提供了該功能,但好笑的是並沒有說如何做。
原來GUI Designer並沒有提供介面,必須以XML Source內修改ptdesign,加入:
<list-property name="includeScripts">
<property>system.js</property>
</list-property>
(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(obj.email.value))
IE: //作用於body
document.body.attachEvent("onscroll", method1);
Firefox: //作用於document或window
document.addEventListener("scroll", method1,false);
或是
window.addEventListener("scroll", method1,false);
function fnIsValidInt(num)
{
var i,j,strTemp;
strTemp="0123456789";
for (i=0;i<num.length;i++)
{
j=strTemp.indexOf(num.charAt(i));
if (j==-1)
{
return false;
}
}
return true;
}
function fnIsValidFlot(NUM)
{
if ( NUM.length== 0)
return false;
if ( NUM=='.' )
return false;
var flag=false;
var i,j,strTemp;
strTemp="0123456789.";
for (i=0;i<NUM.length;i++)
{
j=strTemp.indexOf(NUM.charAt(i));
if (j==-1)
{
return false;
}
}
return true;
}
function setSellerInfoButtonLocation()
{
var btn=document.getElementById('seller-info-link');
btn.style.left=document.body.scrollLeft + document.body.clientWidth -btn.offsetWidth;
btn.style.top = document.documentElement.scrollTop+"px";
}
function array_removeAt(array,index)
{
var newArr=new Array(array.length-1);
var idx=0;
for(var i=0;i<array.length-1;i++)
{
if(i==index)continue;
newArr[idx]=array[i];
idx++;
}
return newArr;
}
-----------------------------------------------------
itemCodesArr=array_removeAt(itemCodesArr,j);
<script>
var sel=document.frmName.selName;
//clear listbox
for(var i=sel.options.length-1;i>=0;i--)
{ sel.options.remove(i); }
</script>
function haveCkedInCheckBox(selectObj)
{
if(selectObj!=null)
{
if(typeof selectObj.length!='undefined')
{
for(var i=0;i<selectObj.length;i++)
{
if(selectObj[i].checked)
return true;
}
}
else
{
return selectObj.checked;
}
}
return false;
}
function chkAll_onclick()
{
var obj=document.getElementById('chkAll');
var objs=frmDelTemp.checkedScoreCodes;
binaryCheckAll(obj,objs);
}
function binaryCheckAll(chkObj,beSelectedChkObjs)
{
if(chkObj!=null && beSelectedChkObjs!=null)
{
if(typeof beSelectedChkObjs.length=='undefined') //uni one row
{
beSelectedChkObjs.checked=chkObj.checked;
}
else
{
for (var i=0;i<beSelectedChkObjs.length;i++)
{
beSelectedChkObjs[i].checked=chkObj.checked;
}
}
}
}
function trim(stringToTrim)
{
return stringToTrim.replace(/^\s+|\s+$/g,"");
}