mic2100
06-16-2007, 05:00 PM
Hi,
I am trying to create a form that allow to me verify user registration details against a government database.
I have a page that exists in an iframe and is submitted via javascript controls in the parent window. This page posts some data to a remote site and then shows the results page. The problem i am having is trying to read the contents of the IFRAME once the page as been submitted.
I can read the contents before the page submit but once it has been done I get an access denied message. if the remote site is a https would that make any differance to it.
function submitform()
{
var surname = document.getElementById("surname").value;
var number = document.getElementById("accreditationNumber").value;
//parent.landmark.onload = function alertIframeContents(){ alert(document.getElementBuId("landmark").innerHtml); };
parent.landmark.document.form1.hiCertNumber.value = number;
parent.landmark.document.form1.hiSurname.value = surname;
parent.landmark.document.form1.submit();
setTimeout("alertIframeContents()", 2000);
}
function alertIframeContents()
{
alert(landmark.document.body.innerHTML);
}
This is the jaascript code i have been using. Is there also a better way to detect wen the remote page as loaded, because this is going to be one of my biggest problems.
Thanks
I am trying to create a form that allow to me verify user registration details against a government database.
I have a page that exists in an iframe and is submitted via javascript controls in the parent window. This page posts some data to a remote site and then shows the results page. The problem i am having is trying to read the contents of the IFRAME once the page as been submitted.
I can read the contents before the page submit but once it has been done I get an access denied message. if the remote site is a https would that make any differance to it.
function submitform()
{
var surname = document.getElementById("surname").value;
var number = document.getElementById("accreditationNumber").value;
//parent.landmark.onload = function alertIframeContents(){ alert(document.getElementBuId("landmark").innerHtml); };
parent.landmark.document.form1.hiCertNumber.value = number;
parent.landmark.document.form1.hiSurname.value = surname;
parent.landmark.document.form1.submit();
setTimeout("alertIframeContents()", 2000);
}
function alertIframeContents()
{
alert(landmark.document.body.innerHTML);
}
This is the jaascript code i have been using. Is there also a better way to detect wen the remote page as loaded, because this is going to be one of my biggest problems.
Thanks