Content iframe (content.org)
The content iframe, which is loaded from the external domain content.org, contains a function that creates the nested iframe element, then loads the proxy.html file with the proper querystring. You can invoke the proxy whenever you need it. In this example, it gets invoked via the setCompletion function.
function setCompletion(result){ //The name of the frame var id = "proxyframe"; //Look for existing frame with name "proxyframe" var proxy = frames[id]; //Set URL and querystring var url = "http://myLMS.com/proxy.html?result=" +result; //If the proxy iframe has already been created if(proxy){ //Redirect to the new URL proxy.location.href = url; } else { //Create the proxy iframe element. var iframe = document.createElement("iframe"); iframe.id = id; iframe.name = id; iframe.src = url; iframe.style.display = "none"; document.body.appendChild(iframe); } }