Anyone help me how pass the checkbox id to a pop up window.I do no how to create a pop up window at the middle of the parent window.
Code:
var ie7 = (document.all && !window.opera && window.XMLHttpRequest) ? true: false;
for (i = 0; i < newsletterall.length; i++) {
if (ie7 == false) {
newsletterall[i].childNodes[1].innerHTML = "";
newsletterall[i].childNodes[3].innerHTML = "";
newsletterall[i].childNodes[5].innerHTML = "";
newsletterall[i].childNodes[7].innerHTML = "";
newsletterall[i].childNodes[9].innerHTML = "";
newsletterall[i].childNodes[11].innerHTML = "";
newsletterall[i].childNodes[13].innerHTML = "";
} else {
newsletterall[i].childNodes[0].innerHTML = "";
newsletterall[i].childNodes[1].innerHTML = "";
newsletterall[i].childNodes[2].innerHTML = "";
newsletterall[i].childNodes[3].innerHTML = "";
newsletterall[i].childNodes[4].innerHTML = "";
newsletterall[i].childNodes[5].innerHTML = "";
newsletterall[i].childNodes[6].innerHTML = "";
}
content += "<input type='checkbox'id='compare" + i + "' name='list'><div id='article" + i + "'><a id='title" + i + "'href='" + hrefoftitle['name' + i] + "'>" + title['name' + i] + "<br></a>" + dateall['name' + i] + "<a href='" + hrefofauthor['name' + i] + "'>" + author['name' + i] + "</a><a href='" + hrefofexternal['name' + i] + "'>" + external['name' + i] + "</a><br>" + summary['name' + i] + "<br><a href='" + hrefofcomment['name' + i] + "'>" + comment['name' + i] + "</a><a href='" + hrefofexter['name' + i] + "'>" + exter['name' + i] + "</a></div></input>";
}
content += "<input type='button' name='goto' onclick='popup1()' value='Check'></form>";
if (ie7 == false) {
newsletterall[0].childNodes[1].innerHTML = content;
} else {
newsletterall[0].childNodes[0].innerHTML = content;
}
I have created the checkbox.Now I need to create a popup window at the middle and get the values of the checkbox and to display it.
To access the object of the parent window, there is a property on the child (e.g. popup) window object called opener.
Using that object you should be able to access the parent window’s form.