domino 常用JScode

domino 常用JScode


domino域栏位添加HTMl 属性--@If(wfclzt!="仓管员办理";"style=\"border:0\" disabled";"")


视图列数值--转自动打开某文件。
res:=TxWPName;
"[<a href=javascript:OpenDoc('"+@Text(@DocumentUniqueID)+"');>"+res+"</a>]"


//制造模式子窗口
if (childwindow && !childwindow.closed)
 {  
 childwindow.focus();
 }


	Print |<Script>
           function OpenDoc(DocId){
             var pathname = (window.location.pathname);
             var pathname1=pathname.substring(0,(pathname.lastIndexOf('.nsf')+5)); 
             var pathname2=pathname1+'0/'+DocId+"?opendocument";
             window.open(pathname2,'_blank', 'toolbar=yes, menubar=yes, scrollbars=yes,resizable=yes,location=yes, status=yes,directories=yes')
           } </Script>|
		   
		   
		   添加随机数缓存问题
$.getJSON(yes.comm.webfoldercount+"?"+new Date().getTime(),function(v){
+"?"+new Date().getTime(),function(v)

+"&time="+new Date().getTime(),function(v)


function OpenView(viewname)
{
var viewUrl = viewname + "?openview";
window.open(viewUrl,"view");
}

function OpenDoc(DocId)
{
var pathname = (window.location.pathname);
thisform = document.forms[0];
var pathname1=pathname.substring(0,(pathname.lastIndexOf('.nsf')+5));
var pathname2=pathname1+'0/'+DocId+"?opendocument";
window.open(pathname1+"OpenUrl?Openform&Url="+pathname2,'_blank', 'toolbar=yes, menubar=yes, scrollbars=yes,resizable=yes,location=yes, status=yes,directories=yes')
}

//获得当前时间
function TimeNow()
{
  var d, s = "&Time=";
  var c = ":";
  d = new Date();
  s += d.getHours() + c;
  s += d.getMinutes() + c;
  s += d.getSeconds() + c;
  s += d.getMilliseconds();
  return(s);
}
//将字符串转换为unicode字符串
function getUnicodeString(sstr){
unicodestr="";
for(i=0;i<sstr.length;i++)
{
unicodestr=unicodestr+sstr.charCodeAt(i)+";";
}
return unicodestr;
}
//取给定字符串中给定子串左边的部分
function strleft(s1,s2){
pos=s1.indexOf(s2)
if(pos!=-1){
return s1.substring(0,pos);
}
else
{return "";
}
}
//取给定字符串中给定子串右边的部分
function strright(s1,s2){
pos=s1.indexOf(s2)
if(pos!=-1){
return s1.substring(pos+1,s1.length);
}
else
{return "";
}
}
//字符串s1是否以字符串s2开始
function isBegin(s1,s2){
if (s1.indexOf(s2)==0){
return true;
}
else
{
return false;
}
}
//压掉字符串中的空格
function trim(s1){
re = / /g;
return  s1.replace(re, "");
  
}

//处理意见内容中的回车
function FormatEnterCharacter(IdeaContent){
	var Str = "";
	var locate = 0;
	var haveNum = 0;
	
	while (IdeaContent != ""){
		
		locate = IdeaContent.indexOf("#ENTER#");
		if (locate != -1){
			haveNum += 1;
			Str += IdeaContent.substring(0,locate) + "<br>";
			IdeaContent = IdeaContent.substring(locate + 7,IdeaContent.length);
		}
		else {
			if (haveNum > 0){
				Str += IdeaContent + "<br>";
			}
			else {
				Str += IdeaContent;
			}
			IdeaContent = "";
		}
		
	}
	return Str;
}


//填写意见
function TianXieYiJian(){
	var thisform = document.forms[0];
	var pathname = (window.location.pathname);
	var docunid = thisform.SelfID.value;
	var loginuser = getUnicodeString(thisform.LoginUser.value);
	
	var newWindowUrl = pathname.substring(0,(pathname.lastIndexOf('.nsf')+5))+'QQWriteIdea?OpenForm&DocID='+docunid+'&User='+loginuser;
	
	Left1 = (window.screen.width-500)/2;
	Top1 = (window.screen.height-400)/2;

	window.open(newWindowUrl,'','status=no,resizable=no,scrollbars=no,width=500,height=420,left='+Left1+',top='+Top1)
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值