Tuesday, June 5, 2012

acessing the parent elements on child page

function assign_value(vname, vid)
{
window.opener.document.getElementById('P2_VENDOR_NAME').value = vname;
window.opener.document.getElementById('P2_VENDOR_ID').value = vid;
window.opener.document.getElementById('P2_X').value = vid;


window.opener.document.getElementById('P2_VENDOR_NAME').focus();
window.opener.doSubmit('LOAD_HEADER');

window.close();

}


callinng popup from the parent page
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,location=0,statusbar=0,menubar=0,scrollbars=1');");
}