JavaScript: Calling actions of an object on the parent page from modal window

andrew-robertson
Community Member Posts: 277 ☆ Superstar ☆
I have a page built in Lectora v21 and it opens a modal window (also built in Lectora) in the middle of a page when a button is clicked, when I close that window I would like to do something with the objects on the parent's page such as disable a specific button. I remember in Flash there was a fairly easy way to do this, but since I am new to JS/JQuery I am a bit lost.
Ideally I'd like to be able to make a call similar to....
obj1234.actionHide();
obj1234.actionShow();
etc....
I remember being able to do this relatively easily in Adobe Animate, but as in my previous posts - I am still fairly green between the ears with JavaScript and the such.
Ideally I'd like to be able to make a call similar to....
obj1234.actionHide();
obj1234.actionShow();
etc....
I remember being able to do this relatively easily in Adobe Animate, but as in my previous posts - I am still fairly green between the ears with JavaScript and the such.
Andrew R.
Developing content since 2010 using a mixed bag of tools.
Developing content since 2010 using a mixed bag of tools.
Tagged:
Answers
-
CarlJFink Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 67 ☆ Superstar ☆Not to short-circuit your question, but if the window is modal and you always want the button disabled when the modal window closes ... why not just have your "open the modal window" button disable that other button immediately, before opening the new window? Same effect, no JS required.
-
-
From a technical perspective, it is a modal window. In Lectora I have created a new page and then I open it as a modal.
However, I have dug a bit deeper and forgot to post before heading on vacation that I tried the below and it worked OK...
parent.functionName();
parent.runGroup_og1234();Andrew R.
Developing content since 2010 using a mixed bag of tools. -
CarlJFink Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 67 ☆ Superstar ☆
A "modal" window is one that blocks the original window, so you can't interact with it until you close the new window. For instance, if you click a "close" button without saving first, many programs cause a confirmation window to appear, and you can't click on or interact with the original window until you either click "Save" or "Close without saving".timk said:From a technical perspective: What is that modal window? A new browser window?
Categories
- 4.8K All Categories
- 6 New Feature Releases
- The Training Arcade®
- Arcades™
- 125 ✫ Announcements
- 9 ✪ Contests
- 34.1K eLearning Brothers® Products
- 33.6K Lectora®
- 31.6K Lectora Discussions
- 1.9K Lectora Feature Requests
- 71 Lectora User Groups
- 17 Asset Library
- 10 AssetLibrary Discussions
- 7 AssetLibrary Feature Requests
- 305 CenarioVR®
- 179 CenarioVR Discussions
- 126 CenarioVR Feature Requests
- 40 Rockstar Learning Platform®
- 28 Rockstar Learning Platform Discussions
- 12 Rockstar Learning Platform Feature Requests
- 4 Off-the-Shelf Course Library
- 3 Off-the-Shelf Course Library Discussions
- 1 Off-the-Shelf Course Library Feature Requests
- 114 CourseMill®
- 107 CourseMill Discussions
- 44 ReviewLink®
- 32 ReviewLink Discussions
- 12 ReviewLink Suggestions
- 2 The Training Arcade®
- 1 The Training Arcade Discussions
- 1 The Training Arcade Feature Requests
- 10 Additional Learning Products
- 2 Adobe®
- 4 Articulate®
- 2 Camtasia®
- Docebo®
- 1 iSpring®
- 1 Microsoft® PowerPoint®
- 932 All Things eLearning
- 5 Course Development Showcase
- 1 eLearning Brothers® Downloads
- 1 Compliance Training
- 11 eLearning Development
- eLearning Game Design
- 7 Instructional Design
- 545 Learning Management System (LMS) Integration
- 3 Mobile Learning
- 22 Visual Design
- 331 Web Accessibility
- 1.2K ♪ The Green Room
- 8 ♡ Community Feedback
- 7 Community Tips