locked
Javascript: Api to Iframe to redirect RRS feed

  • Question

  • Hi-

    trying to get a value from an API, add it to a URL, and then load an iframe with this information. not working

    main page (dingo var writes):

    mm_getAPI();
    mm_adlOnload();
    var dingo = mm_adl_API.LMSGetValue("cmi.core.student_id")
    alert("name:"+window.name+"; "+window.opener);
    
    // -->
    </script>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>my document</title>
    </head>
    <body name="babyeater" id="babyeater">this is a test <script>document.write(dingo);</script>;</p></p></p>
    <iframe src="blank.htm" width="100%" height="800" id="qualtrics" name="qualtrics">
     <p>Your browser does not support iframes.</p>
    
    

    blank.htm:

    function loadit(){
    var stud = window["lesson"]frames["babyeater"].dingo;
    var newlink = "https://ww.com/I&stud_id=" + stud;
    parent.document.getElementById("qualtrics").src=newlink;
    }
    
    // -->
    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>DCB meta Document</title>
    </head>
    <body onLoad="loadit()">this is a testf iframe</p></p></p>
    </body>
    help pls?

    Tuesday, April 19, 2011 9:14 PM

All replies

  • trying var stud = window.opener.document.babyeater.dingo;
    Tuesday, April 19, 2011 9:19 PM