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

andrew-robertson
Community Member Posts: 321 ♦ Idol ♦
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: 116 ♦ Idol ♦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: 116 ♦ Idol ♦
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
- 35.8K All Categories
- 109 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 28.9K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 22 ELB Learning Content
- 22 ELB Learning Content Discussions
- 321 CenarioVR®
- 188 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 41 Rockstar Learning Platform®
- 38 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 5 The Training Arcade®
- 5 The Training Arcade Discussions
- 934 All Things eLearning
- 36 eLearning Development
- 546 Learning Management System (LMS) Integration
- 332 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products