Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Test() {
- document.getElementById("frame").src = "<%: ViewBag.ScormModuleUrl %>";
- document.getElementById("frame").onresize = setWindowSize();
- }
- function setWindowSize() {
- var myWidth = 0, myHeight = 0;
- if (typeof (window.innerWidth) == 'number') {
- myWidth = window.parent.innerWidth; //how to get width of frame window?
- myHeight = window.parent.innerHeight; //how to get height of frame window?
- alert(myHeight + " " + myWidth);
- $("#LaunchWidth").val(myHeight);
- $("#LaunchHeight").val(myWidth);
- updateSaveButtons();
- }
- }
- <div class="col3">
- <a id="training-launch-button" href='javascript:OpenScormModuleWindow(<%: Model.ScormModuleId %> , "<%: ViewBag.ScormModuleUrl %>", "<%: ViewBag.title %>", <%: ViewBag.WindowWidth %>, <%: ViewBag.WindowHeight %>);' class="button" onclick ="Test()">Launch</a>
- </div>
Add Comment
Please, Sign In to add comment