<iframe> and passing vars

glennm
glennm Community Member Posts: 32
I have two Lectora titles I am using together by setting an iframe, via External HTML object, in the "outer" part of the course and referencing to the "inner" part of the course.



The outer part is pub'd for SCORM, the inner part is pub'd for html. I have a timer action in the outer part to grab a variable value in the inner part. OnTimer; 4.0 sec; Action: Modify Variable; Target: MyVarName; Value: Javascript:window.frames.VarendCourse.getValue() "endCourse" is the variable in the inner part I want to get the value of and set for "MyVarName".



This works great unless of course the first page of the inner part takes longer than 4 secs to load after the timer begins in the outer. (Latency is a fly in the ointment for sure.)



My problem is this: I need to be able to capture the value of a variable in the inner part and set the value to variable in the outer part so I can save the value in the LMS and then be able to send the value back the other way (outer to inner) when the student comes back to the course. Timers and timing is definately and issue. I would like a solution that doesn't involve timers. Is there a "setValue" script that might work to go inner to outer and how would it be set up? (I'm thinking OnDone or OnShow for the action.)



Thanks, GlennMI have two Lectora titles I am using together by setting an iframe, via External HTML object, in the "outer" part of the course and referencing to the "inner" part of the course.



The outer part is pub'd for SCORM, the inner part is pub'd for html. I have a timer action in the outer part to grab a variable value in the inner part. OnTimer; 4.0 sec; Action: Modify Variable; Target: MyVarName; Value: Javascript:window.frames.VarendCourse.getValue() "endCourse" is the variable in the inner part I want to get the value of and set for "MyVarName".



This works great unless of course the first page of the inner part takes longer than 4 secs to load after the timer begins in the outer. (Latency is a fly in the ointment for sure.)



My problem is this: I need to be able to capture the value of a variable in the inner part and set the value to variable in the outer part so I can save the value in the LMS and then be able to send the value back the other way (outer to inner) when the student comes back to the course. Timers and timing is definately and issue. I would like a solution that doesn't involve timers. Is there a "setValue" script that might work to go inner to outer and how would it be set up? (I'm thinking OnDone or OnShow for the action.)



Thanks, GlennM
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!