PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/test/test.html

https://github.com/tsschnoc/gapps_script_shared
HTML | 86 lines | 68 code | 18 blank | 0 comment | 0 complexity | e2306cb12cb42684ebf578b7231ce046 MD5 | raw file
  1. <td class="dataCol col02">
  2. <input type="hidden" name="con8" id="con8" value="thomas ex">
  3. <input type="hidden" name="con8_lkold" id="con8_lkold" value="thomas ex">
  4. <input type="hidden" name="con8_lktp" id="con8_lktp" value="003">
  5. <input type="hidden" name="con8_lspf" id="con8_lspf" value="0">
  6. <input type="hidden" name="con8_lspfsub" id="con8_lspfsub" value="0">
  7. <input type="hidden" name="con8_mod" id="con8_mod" value="1">
  8. <span class="lookupInput">
  9. <select id="con8_lkid" name="con8_lkid" onchange="getElementByIdCS('con8').value = getElementByIdCS('con8_lkid').selectedIndex == 0 ? '' : getElementByIdCS('con8_lkid').options[getElementByIdCS('con8_lkid').selectedIndex].text ; getElementByIdCS('con8_lkold').value = getElementByIdCS('con8').value"
  10. tabindex="8" title="Reports To Select">
  11. <option value="">--None--</option>
  12. <option value="003G00000138aDk" selected="selected">thomas ex</option>
  13. <option value="003G0000011wzvj">Thomas Schnocklake</option>
  14. </select>
  15. <a href="javascript:%20openLookup%28%27%2F_ui%2Fcommon%2Fdata%2FLookupPage%3Flkfm%3DeditPage%26lknm%3Dcon8%26lktp%3D%27%20%2B%20getElementByIdCS%28%27con8_lktp%27%29.value%2C670%2C%271%27%2C%27%26lksrch%3D%27%20%2B%20escapeUTF%28%28getElementByIdCS%28%27con8_lkid%27%29.selectedIndex%20%3E%200%29%20%3F%20getElementByIdCS%28%27con8_lkid%27%29.options%5BgetElementByIdCS%28%27con8_lkid%27%29.selectedIndex%5D.text%20%3A%20%27%27.substring%280%2C%2080%29%29%29"
  16. id="con8_lkwgt" onclick="setLastMousePosition(event)" tabindex="8" title="Reports To Lookup (New Window)"><img src="/s.gif" alt="Reports To Lookup (New Window)" class="lookupIcon" onblur="this.className = 'lookupIcon';" onfocus="this.className = 'lookupIconOn';" onmouseout="this.className = 'lookupIcon';this.className = 'lookupIcon';" onmouseover="this.className = 'lookupIconOn';this.className = 'lookupIconOn';" title="Reports To Lookup (New Window)"></a>
  17. </span>
  18. <div class="errorMsg">
  19. <strong>Error:</strong>Multiple items found. Select from drop-down or click icon
  20. to refine search.</div>
  21. </td>
  22. <td class="dataCol col02">
  23. <input type="hidden" name="con8_lkid" id="con8_lkid" value="000000000000000">
  24. <input type="hidden" name="con8_lkold" id="con8_lkold" value="null">
  25. <input type="hidden" name="con8_lktp" id="con8_lktp" value="003">
  26. <input type="hidden" name="con8_lspf" id="con8_lspf" value="0">
  27. <input type="hidden" name="con8_lspfsub" id="con8_lspfsub" value="0">
  28. <input type="hidden" name="con8_mod" id="con8_mod" value="0">
  29. <span class="lookupInput">
  30. <input id="con8" maxlength="255" name="con8" onchange="getElementByIdCS('con8_lkid').value='';getElementByIdCS('con8_mod').value='1';"
  31. size="20" tabindex="8" type="text">
  32. <a href="javascript:%20openLookup%28%27%2F_ui%2Fcommon%2Fdata%2FLookupPage%3Flkfm%3DeditPage%26lknm%3Dcon8%26lktp%3D%27%20%2B%20getElementByIdCS%28%27con8_lktp%27%29.value%2C670%2C%271%27%2C%27%26lksrch%3D%27%20%2B%20escapeUTF%28getElementByIdCS%28%27con8%27%29.value.substring%280%2C%2080%29%29%29"
  33. id="con8_lkwgt" onclick="setLastMousePosition(event)" tabindex="8" title="Reports To Lookup (New Window)"><img src="/s.gif" alt="Reports To Lookup (New Window)" class="lookupIcon" onblur="this.className = 'lookupIcon';" onfocus="this.className = 'lookupIconOn';" onmouseout="this.className = 'lookupIcon';this.className = 'lookupIcon';" onmouseover="this.className = 'lookupIconOn';this.className = 'lookupIconOn';" title="Reports To Lookup (New Window)"></a>
  34. </span>
  35. </td>
  36. console.log($('#con8').after('<select id="questionBox" name="questionBox"> <option selected="selected" value="-">------------------------</option> </select>'));
  37. $('#con8').hide();
  38. $('#con8').parent().removeClass('lookupInput');
  39. $('#con8').parent().find('a').remove();
  40. var container = $('#con8').parent().parent();
  41. var lkid = $('#con8_lkid').clone();
  42. var selectedId = $('#con8_lkid').val();
  43. var selectedVal = $('#con8').val();
  44. container.empty();
  45. container.append(lkid);
  46. var set =$('<select id="questionBox" name="questionBox"> </select>')
  47. .append('<option selected="selected" value="-">------------------------</option>');
  48. container.append('<select id="questionBox" name="questionBox"> <option selected="selected" value="-">------------------------</option> </select>');
  49. container.append('<select id="questionBox" name="questionBox"> <option selected="selected" value="-">------------------------</option> </select>');
  50. var container = $('#con8').parent().parent();
  51. var selectedId = $('#con8_lkid').val();
  52. var selectedVal = $('#con8').val();
  53. container.empty();
  54. var sel =$('<select id="con8_lkid" name="con8_lkid"> </select>');
  55. if (selectedId == '000000000000000') {
  56. sel.append('<option selected="selected" value="">------------------------</option>')
  57. } else {
  58. sel.append('<option value="">------------------------</option>')
  59. sel.append('<option selected="selected" value="' + selectedId + '">' + selectedVal + '</option>');
  60. }
  61. var cont = [
  62. {id:'003A000000gHIVW', name:'Mr. Avi Green'},
  63. {id:'003A000000gHIVV', name:'Ms. Edna Frank'}
  64. ];
  65. for (i = 0; i < cont.length; i++) {
  66. sel.append('<option selected="selected" value="' + cont[i].id + '">' + cont[i].name + '</option>');
  67. }
  68. container.append(sel);