Explore the community Forums Lectora Lectora Questions & Answers Adjust browser window to course dimensions

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #283702 Score: 1
    Profile photo of amak
    amak
    Member
    beginner
    intermediate
    friend finder
    curious george
    wise owl
    2 pts
    @amak

    Hi everyone,

    Is there a way to resize the browser window to the dimensions of the course when it is launched?

    Thanks in advance!

    This post has received 1 vote up.
    #287607 Score: 2
    Profile photo of Sergey Snegirev
    Sergey Snegirev
    Member
    contributor
    intermediate
    advanced
    friend finder
    lab member
    junior moderator
    advocate
    LUC16
    LUC16 Attendee
    wise owl
    337 pts
    @ssneg

    Is the course opened in a pop-up from your LMS? If yes, there should be a setting in the LMS to select the popup size.

    However, you can also do in Lectora: On Show > Execute JavaScript > “window.resizeTo(200,200);”. It will load the course and then resize it to 200px by 200px.

    This post has received 2 votes up.
    #287608 Score: 1
    Profile photo of Sergey Snegirev
    Sergey Snegirev
    Member
    contributor
    intermediate
    advanced
    friend finder
    lab member
    junior moderator
    advocate
    LUC16
    LUC16 Attendee
    wise owl
    337 pts
    @ssneg

    Example: http://jsfiddle.net/mbph7qmk/1/

    This post has received 1 vote up.
    #287609 Score: 0
    Profile photo of amak
    amak
    Member
    beginner
    intermediate
    friend finder
    curious george
    wise owl
    2 pts
    @amak

    Thank you, that worked perfectly!

    #294965 Score: 2
    Profile photo of Roz Schwartz
    Roz Schwartz
    Member
    beginner
    intermediate
    junior moderator
    profile
    entry
    entry
    advanced
    friend finder
    contributor
    13 pts
    @rgs55

    I had to use “top” for it to work for me, but honestly I cannot remember why… so, this is another option if the other does not work. I also size the window slightly bigger than the course itself to accommodate for the browser title bar and border. My actual course size is: 1009 x 662

    javascript:top.window.resizeTo(1025, 730)

    This post has received 2 votes up.
    #295096 Score: 1
    Profile photo of charles jumonville
    charles jumonville
    Member
    beginner
    intermediate
    1 pt
    @cjumonville3474

    This doesn’t seem to work for me. Maybe I’m doing it wrong? I added an OnShowRunJS action to the Title level of:

    window.resizeTo(200,200);

    I also tried:

    top.window.resizeTo(200,200);

    Neither did anything. The windows still open up at full screen. Any advice? Did I put the JS action at the wrong level? I also tried the AU level with the same results.

    This post has received 1 vote up.
    #295137 Score: 0
    Profile photo of rwalters
    rwalters
    Member
    contributor
    beginner
    intermediate
    advanced
    curious george
    wise owl
    6 pts
    @rwalters

    How are you launching the course (from an LMS, HTML page or a page created with Lectora)?

    #295138 Score: 0
    Profile photo of charles jumonville
    charles jumonville
    Member
    beginner
    intermediate
    1 pt
    @cjumonville3474

    Publishing to SCORM and launching via Cornerstone LMS.

    The LMS only allows two sizes to launch content and the setting affects all courses, so I’ll have to find a way to set the window size within Lectora. Any advice?

    #295212 Score: 1
    Profile photo of Roz Schwartz
    Roz Schwartz
    Member
    beginner
    intermediate
    junior moderator
    profile
    entry
    entry
    advanced
    friend finder
    contributor
    13 pts
    @rgs55

    When you are publishing, make sure the checkbox for “launch course in separate window from the LMS.” is checked. I set up a group at the topmost course level with two actions: 1) The action to resize the window, 2) An action to set a variable that this was done (var_WinResized > Set Equal To > yes). Then, also at the topmost course level, I have a runGroup to run that action group, IF, the window has not yet been resized (if var_WinResized > Not Equal To > yes). I do this so the resizing happens only once and does not attempt to resize each page.

    I publish to SCORM 1.2 and use Cornerstone.

    This post has received 1 vote up.
    #296162 Score: 0
    Profile photo of charles jumonville
    charles jumonville
    Member
    beginner
    intermediate
    1 pt
    @cjumonville3474

    I got it to work! I had to move the “top” to the middle. No idea what this means, but thanks for the help!

    window.top.resizeTo(200,200);

    #329738 Score: 0
    Profile photo of tila72000
    tila72000
    Member
    beginner
    intermediate
    friend finder
    contributor
    wise owl
    curious george
    1 pt
    @tila72000

    Where do I place this code in the course? Is it after the Title or AU?

    #329958 Score: 0
    Profile photo of Nick Williams
    Nick Williams
    Member
    friend finder
    beginner
    intermediate
    contributor
    wise owl
    curious george
    8 pts
    @nwilliams3743

    Could someone post an example of this, as I too cannot seem to get this working

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.