• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Advanced action that includes different browser window size

Community Beginner ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Gentlefolk,

Captivate 2019

 

I have an introductory slide that has two buttons.

 

One button when clicked allows the project to continue.

 

The other button downloads a Learner's Guide file to the user, then allows the project to proceed.

 

The download button includes an Advanced Action that specifies that a NEW browser window be opened for the file download, with the course proceeding in the original window.

 

Functionally, this is working correctly. BUT, the download window (as tested in Scormcloud) appears over the course window, so it appears that the course has stopped. 

 

Is there a better way to handle this optional download scenario? One thought I had was to have the download window in a smaller size so it would not totally obscure the content window. But I see no option within an Advanced Action that allows for this specificity when using the "Open URL or File" action. 

 

Thank you for any thoughts.

 

Don

Views

239

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Perhaps a small JavaScript entry in that Advanced Action...?

 

window.open("path_to_the_file", "_blank", "width=400,height=400");

 

This would open a new window of the size indicated and attempt to download the file.

User may still have another window come up to ask for location of download.

Would something like that work for you?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Hmmm.... I have not added JS to an Advanced Action.... I will give that a shot....

 

OK, in the Advanced Action, I selected to "Execute Javascript" and entered:

 

window.open("LO SR LG Change Management.docx", "_blank", "width=400,height=400");

in a NEW window.

 

The doc downloaded, but the browser window remained full sized.

 

And, thinking about this, a separate smaller window wouldn't work. For this to really work, I would need a window to pop up in the parent window that is smaller. ANd now REALLY thinking about this, I don't need another window to open at all... I just need the button the download the file, and then the user can click the "continue" button. 

 

So I think that is the way to go.... Occam's Razor and all that.

 

Yeah, just checked... that approach works well, just have a button dedicated to downloading the file and another to advance the project. 

 

OK, thanks!

 

But would LOVE to know how to change a browser window...that could be really useful in the future.

 

Thoughts? Where did I go wrong?

 

Don

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

A couple of suggestions for you.

 

I noticed that the file you were trying to download had spaces in the filename.  This is not a good idea.  Most likely your learning content will be delivered from an LMS or other type of web server and web files are expected to NOT have spaces.  Even being all lower case is often a good idea since some web servers ignore capitalisation while others do not. Having spaces in file names can cause the links to break.  I'm pointing this out because you've probably only been testing this functionality so far from your own computer using Captivate's Preview as HTML feature.  But once you uploaded it to a web server you could find things don't work again.

 

Rather than having end users download an MS Word doc, consider using a PDF.  You might find that behaves differently because it will open in the browser's PDF Reader plugin.

 

Another thing you may need to consider if any of your learners will be viewing content from a mobile device is that the mobile browsers may handle things very differently to desktop browsers.  If you have a mobile audience, do testing on that aspect too.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 21, 2021 Dec 21, 2021

Copy link to clipboard

Copied

Hi Rod,

Yeah, I was going to remove the spaces from the filename once I got the process sorted....and I actually did, but owing to a stupid human trick the file WITH the spaces got attached as I was ham-handing around  And you are correct the Taleo LearnCenter will tolerate spaces in filenames, but it is grumpy about it.

 

We are not yet dealing with mobile considerations, accepting the adaptive nature of web display as sufficient for right now. You will also note that a Word file is the target here... and that is beyond my control since having an editable file is part of the spec of this project. And creating an editable PDF is beyond my level of interest for this effort.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Dec 21, 2021 Dec 21, 2021

Copy link to clipboard

Copied

When you say change the browser window, do you mean which window has focus?

 

Generally the window you open will have the focus and be on top. If it was html you could write JS to throw the focus back to the main window.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 21, 2021 Dec 21, 2021

Copy link to clipboard

Copied

Yes, in this case, the download window is taking the focus so the content screen has drifted to the back.

 

But this has become an academic question now since it really turns out better to have the Download button action on the current window - but the idea of being able to control a window size through an Advanced Action is really a neat one so it would be fun to get that noodled out.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Another suggestion would be to use a Web Object. This way it will open in the slide and users will see the document and download it if they choose. Take your PDF file, place it in a ZIP file and simply drag it onto your slide for a fast way to do this.

Paul Wilson, CTDP

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 21, 2021 Dec 21, 2021

Copy link to clipboard

Copied

LATEST

Hi Paul,

OOOhhhhh... I LIKE that! Yes, yes, yes.... an option I will look at today. Thanks for that!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources