Hi,
Sample code:
function CheckboxChange(checkbox) {
if (checkbox.checked == true) {
alert(checkbox.value);
}
}
function LoadIframeContent() {
var myIFrame = document.getElementById('IFRAME_test');
if (!myIFrame || !myIFrame.contentWindow || myIFrame.readyState !== 'complete') {
window.setTimeout(LoadIframeContent, 10);
}
else if (myIFrame.contentWindow.document == null) {
window.setTimeout(LoadIframeContent, 10);
}
else if (myIFrame.contentWindow.document.body == null) {
window.setTimeout(LoadIframeContent, 10);
}
else {
if (myIFrame.contentWindow.document.getElementById("chkTest") != null) {
var checkbox = myIFrame.contentWindow.document.getElementById("chkTest");
checkbox.attachEvent("onchange", function () { CheckboxChange(checkbox) });
}
}
}
window.setTimeout(LoadIframeContent, 10);
I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful. -------------------------------------------------------------------------------- Jhansi