Guest User

Untitled

a guest
Jan 19th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. function Test() {
  2. document.getElementById("frame").src = "<%: ViewBag.ScormModuleUrl %>";
  3. document.getElementById("frame").onresize = setWindowSize();
  4. }
  5. function setWindowSize() {
  6. var myWidth = 0, myHeight = 0;
  7. if (typeof (window.innerWidth) == 'number') {
  8. myWidth = window.parent.innerWidth; //how to get width of frame window?
  9. myHeight = window.parent.innerHeight; //how to get height of frame window?
  10. alert(myHeight + " " + myWidth);
  11. $("#LaunchWidth").val(myHeight);
  12. $("#LaunchHeight").val(myWidth);
  13. updateSaveButtons();
  14. }
  15. }
  16. <div class="col3">
  17. <a id="training-launch-button" href='javascript:OpenScormModuleWindow(<%: Model.ScormModuleId %> , "<%: ViewBag.ScormModuleUrl %>", "<%: ViewBag.title %>", <%: ViewBag.WindowWidth %>, <%: ViewBag.WindowHeight %>);' class="button" onclick ="Test()">Launch</a>
  18. </div>
Add Comment
Please, Sign In to add comment