1/*! jPopInfo v1.1 | (c) Ohman Automation Corp. */ 2var d=document; 3var conf={ 4 'handler':'dd.ashx', 5 'showOkMsg':false, 6 'showDbg':true 7}; 8function popForm(m,k,pt,pw,ph){ //--- open pop-up, m=rFld mode, k=rKey val, pt=pop-up title 9 //var f=d.formMain; 10 var e=$('#popPanel'); 11 if(!pw){pw='auto'}; 12 if(!ph){ph='auto'}; 13 console.log('test, m: '+m+', k: '+k+', pt: '+pt+', pw: '+pw+', ph: '+ph); 14 //console.log('test: '+f.rCode.value+', m: '+m+', k: '+k); 15 //f.rKey.value=k; 16 //$('#popFrame').attr('src',baseSrc); 17 $(e).html("loading..."); 18 var fData=new FormData(); 19 fData.append('rFld', m); 20 fData.append('rVal', k); 21 dynamicTagAjax(fData,$(e)); 22 23 $(e).dialog({ 24 modal: true, 25 width: pw, 26 height: ph, 27 title: pt, 28 position: { my: 'center top', at: 'center top+20', of: window }, 29 buttons: { 30 Close: function () { 31 $(this).dialog('close'); 32 } 33 } 34 }); 35 return false; 36} 37function subPopForm(f,e){ 38 console.log('form.name: '+f.name); 39 var fData=new FormData(f); 40 dynamicTagAjax(fData,$(e)); 41} 42function dynamicTagAjax(fData,e){ //--- AJAX submit the dynamic form 43 $.ajax({ // f=form, e=element selector for results 44 url: '/'+conf.handler, 45 type: 'POST', 46 dataType: 'JSON', 47 contentType: false, 48 processData: false, 49 traditional: true, 50 data: fData 51 }) 52 .done(function(r){ // process the returned JSON data 53 if(r.res.toLowerCase() == 'ok'){ 54 if(conf.showDbg){console.log('res: '+r.res+'\n'+'newCode:\n'+r.data.newCode.substring(0, 100)+' ....');} 55 if(conf.showDbg){console.log('retFlag: '+r.data.retFlag);} 56 if(conf.showOkMsg && r.msg.length>0){alert('message: '+r.msg);} 57 //if(conf.showDbg){console.log('res: '+r.res+'\nmsg: '+r.msg.substring(0, 100)+' ....');} 58 //alert('res: '+r.res+'\nmsg: '+r.msg); 59 $(e).html(r.data.newCode); 60 $(e).dialog({ 61 position: { my: 'center top', at: 'center top+20', of: window }, 62 }); 63 }else{ 64 alert('problem: '+r.msg); 65 } 66 }) 67 .fail(function(r){ // handle a failed submittal 68 alert('AJAX submittal failed'); 69 if(r.res){console.log('res: '+r.res);} 70 if(r.msg){console.log('msg: '+r.msg);} 71 }) 72 .always(function(){ 73 // if(conf.showDbg){console.log('always')}; 74 }); 75}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.