ListIN_InventoryNumber_INTERNALID(this) 用来把多选的列表框div构造出来 SearchIN_InventoryNumber_INTERNALID(document.forms[‘main_form’].elements.IN_InventoryNumber_INTERNALID_display.value) //用来把internalid传递给弹出的…
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>
</span></TD><TD nowrap><span id\=’IN_InventoryNumber_INTERNALID_fs’ style\=’white-space: nowrap’>
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)
6611{
6612 if(window.popupDivLoadingMessage == null)
6613 {
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;
6623 }
6624 var msg = sMessage == null ? “Loading” : sMessage;
6625 window.popupDivLoadingMessage.innerHTML = “
| “+msg+” |
“;
6626 document.body.appendChild(window.popupDivLoadingMessage);
6627 var dispFld = document.getElementById(fieldName + “\_display”);
6628 var top = 0;
6629 var left = 0;
6630
6631
6632 var scrollDiv = findClassUp(dispFld,’scrollarea’);
6633 var scrollTopOffset = 0;
6634 var scrollLeftOffset = 0;
6635 if(scrollDiv!=null)
6636 {
6637 scrollTopOffset = scrollDiv.scrollTop;
6638 scrollLeftOffset = scrollDiv.scrollLeft;
6639 }
6640
6641 if(dispFld != null && !bMultiselect)
6642 {
6643 top = findPosY(dispFld) + dispFld.offsetHeight – 1 – scrollTopOffset;
6644 left = findPosX(dispFld) – scrollLeftOffset;
6645 window.popupDivLoadingMessage.style.width = Math.max(75,dispFld.offsetWidth);
6646 }
6647 else
6648 {
6649 top = Math.max(lastY,10) + document.body.scrollTop;
6650 left = Math.max(lastX,10) + document.body.scrollLeft;
6651 }
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;
6660}
function NLPopupSelect\_onClick(evnt)
6663{
6664
6665 var popupDiv = window.popupDIV
6666 if( popupDiv != null )
6667 {
6668 var target = getEventTarget(evnt);
6669 var div = findClassUp(target,’popupouter’);
6670
6671 if ( div == null || div != popupDiv )
6672 {
6673 NLPopupSelect\_close();
6674 }
6675 }
6676
6677}
\====================================================================
function NLPopupSelect\_close(bFocusNextField)
6680{
6681 if(window.popupDIV != null)
6682 {
6683
6684
6685 if (isIE)
6686 nlRemoveCanvas(window.popupDIV);
6687
6688 if( window.popupDIV.getAttribute(‘launchbutton’) != null && window.popupDIV.getAttribute(‘bIsMultiButton’)==”F”)
6689 {
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”;
6693 }
6694 document.body.removeChild(window.popupDIV);
6695
6696
6697 if(bFocusNextField)
6698 {
6699 var dispFld = document.getElementById(window.popupDIV.getAttribute(“fieldName”) + “\_display”);
6700 if (dispFld != null)
6701 NLPopupSelect\_focusNextInputField(dispFld.name, dispFld.form, true);
6702 }
6703
6704 window.popupDIV = null;
6705 }
6706}
6707

发表回复