Explore the community Forums Lectora Lectora Questions & Answers Irame with dynamic src using variables

Viewing 1 post (of 1 total)
  • Author
  • #272023 Score: 0
    Profile photo of Justin Ball
    Justin Ball
    friend finder
    wise owl
    LUC17 Attendee
    LUC17 Presenter
    3 pts

    Tried it and didn’t work out. But in further testing I found a solution that is posted below. In the Lectora title I created three custom variables:CourseIDStudentIDSurveyURLThen created six actions to build the URL string:First VarName:UpdateCourseIDOn:ShowAction:Modify VariableTarget:CourseIDValue:VAR(AICC_Course_ID)Mod Type:Set Variable ContentsSecond VarName:UpdateStudentIDOn:ShowAction:Modify VariableTarget:StudentIDValue:VAR(AICC_StudentCourse_ID)Mod Type:Set Variable ContentsThird VarName:UpdateSurveyURLOn:ShowAction:Modify VariableTarget:SurveyURLValue:http://www.url.com/?CourseID=Mod Type:Set Variable ContentsForth VarName:AddCourseIDValuetoSurveyURLOn:ShowAction:Modify VariableTarget:SurveyURLValue:VAR(CourseID)Mod Type:Add to VariableFifth VarName:AddStudentIDQueryStringtoSurveyURLOn:ShowAction:Modify VariableTarget:SurveyURLValue:&StudentID=Mod Type: Add to VariableSixth VarName:AddStudentIDValuetoSurveyURLOn:ShowActionModify VariableTarget:SurveyURLValue:VAR(StudentID)Mod Type:Add to VariableThen on the page that the iframe is displayed I added one action and two external HTML icons.First Action above the two external HTML:Name:OnShowRunFunctionOn:ShowAction:Go ToTarget:Web AddressWeb Address:javascript:EvalIframe();First External HTML object:Object Name:EvalIframeObject Type:Header ScriptingCustom HTML:function EvalIframe() {var SurveyURL = VarSurveyURL.getValue();document.getElementById(‘loadevaliframe’).src = SurveyURL;}Second External HTML Object:Object Name:loadevalObject Type:OtherCustom HTML:

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.