소스 검색

Shifting requiresScript to window.onload function

Eager Beaver 5 년 전
부모
커밋
956870f953
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      views/smokingHabits.html

+ 5 - 5
views/smokingHabits.html

@@ -29,13 +29,13 @@ Loading
 
 
 window.onload = init();
-LABKEY.requiresScript("/tecant/scripts/tecant/generateTable.js", function() {
-            // Called back when all the scripts are loaded onto the page
-            alert("Ready to go!");
-        });
-
 //var generateTable=require("tecant/generateTable.js");
+
 function init(){
+    LABKEY.requiresScript("/tecant/scripts/tecant/generateTable.js", function() {
+            // Called back when all the scripts are loaded onto the page
+            document.getElementById('formStatus').value+="\n Adding scripts";
+        });
 	generateTable("existingCondition","smokingHabitsDiv",true);
 }