• netsuite filter的选择框 代码控制


    ListIN_InventoryNumber_INTERNALID(this)   用来把多选的列表框div构造出来
    
    SearchIN_InventoryNumber_INTERNALID(document.forms['main_form'].elements.IN_InventoryNumber_INTERNALID_display.value)
    
    //用来把internalid传递给弹出的div搜索框中
    
     
    
    经典代码行: 
    
    <TR><TD valign=top style='padding-top:3px' nowrap align=right class='smalltextnolink'>
    
    <span style="white-space: wrap" id="IN_InventoryNumber_INTERNALID_fs_lbl" class="smalltextnolink">
    
    <A class='smalltextnolink' tabindex=-1 title="What's this?" href='javascript:void("help")' style='cursor:help' onclick="return nlFieldHelp(402,'NONE_NEEDED','IN_InventoryNumber_INTERNALID', this)" onmouseover="this.className='smalltextul'; return true;" onmouseout="this.className='smalltextnolink'; "></A>
    
    &nbsp;</span></TD><TD nowrap><span id='IN_InventoryNumber_INTERNALID_fs' style='white-space: nowrap'>
    
    <textarea name='IN_InventoryNumber_INTERNALID_display' rows='4'  cols='28' class='input' style="280;color:999999;" onkeypress='event.cancelBubble = true; return true;' spellcheck=false onfocus="if (value == _mult_popup_help) {value = '';style.color='000000';}if (typeof(this.isvalid) == undefined) this.isvalid=true;"  bmultiautosuggest='T' onkeyup="if(NLPopupAutoSuggest_ignoreKeyStrokes(event)) { return false; } else { NLPopupAutoSuggest_handleKeyStroke(this, '8658105:IN_InventoryNumber_INTERNALID', event, true, null); }" onkeydown="if(NLPopupAutoSuggest_ignoreKeyStrokes(event)) return false; var keycode = getEventKeypress(event); if(keycode == 13 || keycode == 9) { NLPopupAutoSuggest_hidePopupSuggestion(); }" onblur="if (this.isvalid == false) {this.focus();this.select();} else if (value == '') {value=_mult_popup_help;style.color='999999'}" wrap='VIRTUAL' onchange="SearchIN_InventoryNumber_INTERNALID(document.forms['main_form'].elements.IN_InventoryNumber_INTERNALID_display.value);"><Type & tab for single value></textarea>
    
     
    
    
    
    function SearchIN_InventoryNumber_INTERNALID(value)
    {
    
    
    hideAutoSuggestLoadingImage();if ( isValEmpty(value) || value==_short_popup_help || value==_popup_help ) {
    getFormElement(parent.document.forms['main_form'],'IN_InventoryNumber_INTERNALID').value = '';getFormElement(parent.document.forms['main_form'],'IN_InventoryNumber_INTERNALID_display').isvalid = true;window.isvalid = true;getFormElement(parent.document.forms['main_form'],'IN_InventoryNumber_INTERNALID').onchange();return; }
    var doExactMatchQuery = NLPopupSelect_getExactMatchQuery( getFormElement(parent.document.forms['main_form'],'IN_InventoryNumber_INTERNALID_display') );if ( value.indexOf(_mult_popup_help) != -1 ) return;
    else if ( getMultiSelectValues(document.forms['main_form'].elements['IN_InventoryNumber_INTERNALID']).length != 0 ) {
    if ( value == null || value.length == 0) {parent.document.forms['main_form'].elements['IN_InventoryNumber_INTERNALID'].value = '';return; }var a = getMultiSelectValues(document.forms['main_form'].elements['IN_InventoryNumber_INTERNALID']).split('\005');var currentlinenum = a.length;var lines = value.replace(/[\n\r]+$/, '').split(/\n|\r/);if (currentlinenum > lines.length) {a.length = lines.length;parent.document.forms['main_form'].elements['IN_InventoryNumber_INTERNALID'].value = a.join('\005');currentlinenum = lines.length; }if (currentlinenum==1 && lines.length==1) {parent.document.forms['main_form'].elements['IN_InventoryNumber_INTERNALID'].value = '';value = lines[0]; }else { value = lines[currentlinenum]; }if (value == null || value.length == 0) return;}window.status = 'Searching...';window.setIsInited(window, false);var eventVar = '';
    if( window.lastKeyStroke == 13 )
    {
    window.lastKeyStroke = -1;
    eventVar = 'enterEvent=T';
    }
    NLPopupSelect_displayLoadingDiv('IN_InventoryNumber_INTERNALID', true,'Searching...');
    loadSlavingResults('/app/common/search/search.nl?filter=IN_InventoryNumber_INTERNALID&searchtype=Transaction&q=IN_InventoryNumber_INTERNALID&st='+encode(value+(doExactMatchQuery ? '\\' : ''))+'&f=T'+ '&'+eventVar+'');}
    
    
    embedded:
    
    
    
    function NLPopupSelect_displayLoadingDiv(fieldName, bMultiselect, sMessage)
    6612 if(window.popupDivLoadingMessage == null)
    6614 var div = document.createElement("DIV");
    6615 div.id = "popup_load_message";
    6616 div.style.backgroundColor = "white";
    6617 div.style.position = "absolute";
    6618 div.style.borderWidth='1px';
    6619 div.style.borderStyle='solid';
    6620 div.style.borderColor='black';
    6621 div.style.width = "150";
    6622 window.popupDivLoadingMessage = div;
    6624 var msg = sMessage == null ? "Loading" : sMessage;
    6625 window.popupDivLoadingMessage.innerHTML = "<table width='100%'><tr><td valign='middle' class='texttablectr'>"+msg+"</td></tr></table>";
    6626 document.body.appendChild(window.popupDivLoadingMessage);
    6627 var dispFld = document.getElementById(fieldName + "_display");
    6628 var top = 0;
    6629 var left = 0;
    6632 var scrollDiv = findClassUp(dispFld,'scrollarea');
    6633 var scrollTopOffset = 0;
    6634 var scrollLeftOffset = 0;
    6635 if(scrollDiv!=null)
    6637 scrollTopOffset = scrollDiv.scrollTop;
    6638 scrollLeftOffset = scrollDiv.scrollLeft;
    6641 if(dispFld != null && !bMultiselect)
    6643 top = findPosY(dispFld) + dispFld.offsetHeight - 1 - scrollTopOffset;
    6644 left = findPosX(dispFld) - scrollLeftOffset;
    6645 window.popupDivLoadingMessage.style.width = Math.max(75,dispFld.offsetWidth);
    6647 else
    6649 top = Math.max(lastY,10) + document.body.scrollTop;
    6650 left = Math.max(lastX,10) + document.body.scrollLeft;
    6653 if( (top + 30) > (getDocumentHeight() + document.body.scrollTop - 10) )
    6654 top = getDocumentHeight() + document.body.scrollTop - 30;
    6655 if( (left + 150) > (getDocumentWidth() + document.body.scrollLeft - 10) )
    6656 left = getDocumentWidth() + document.body.scrollLeft - 175;
    6657 window.popupDivLoadingMessage.style.left = left;
    6658 window.popupDivLoadingMessage.style.top = top;
    6659 window.popupDivLoadingMessage.style.zIndex = 10;
    function NLPopupSelect_onClick(evnt)
    6665 var popupDiv = window.popupDIV
    6666 if( popupDiv != null )
    6668 var target = getEventTarget(evnt);
    6669 var div = findClassUp(target,'popupouter');
    6671 if ( div == null || div != popupDiv )
    6673 NLPopupSelect_close();
    ====================================================================
    function NLPopupSelect_close(bFocusNextField)
    6681 if(window.popupDIV != null)
    6685 if (isIE)
    6686 nlRemoveCanvas(window.popupDIV);
    6688 if( window.popupDIV.getAttribute('launchbutton') != null && window.popupDIV.getAttribute('bIsMultiButton')=="F")
    6690 var img = NLPopupSelect_getLaunchButton(window.popupDIV.getAttribute('launchbutton'), window.popupDIV.getAttribute('bIsMultiButton')=="T", window.popupDIV.getAttribute('bListOnly')=="T");
    6691 if(img != null)
    6692 img.src = "/images/forms/list2.gif";
    6694 document.body.removeChild(window.popupDIV);
    6697 if(bFocusNextField)
    6699 var dispFld = document.getElementById(window.popupDIV.getAttribute("fieldName") + "_display");
    6700 if (dispFld != null)
    6701 NLPopupSelect_focusNextInputField(dispFld.name, dispFld.form, true);
    6704 window.popupDIV = null;

    纠正错误,欢迎探讨:
    打开微信-发现-扫一扫
  • 相关阅读:
    torch.Tensor.view (Python method, in torch.Tensor)
    python子类调用父类的方法
    读sru代码
    Python标准库内置函数complex介绍
    numpy之ones,array,asarray
    failed: Name or service not known. wget: unable to resolve host address Ubuntu报错解决
    C++部分基础知识笔记
    《机器学习》西瓜书第十三章半监督学习
    python小笔记
    解决python中调用 imread 报错:ImportError: cannot import name imread
  • 原文地址:https://www.cnblogs.com/backuper/p/1499785.html
Copyright © 2020-2023  润新知