Is there a way to successfully transfer a value from Modal1 to Modal2? I am facing an issue where Modal1 opens Modal2 to receive a necessary value, but I keep encountering the error message: "Uncaught TypeError: Cannot read property 'click' of null". Despite ensuring that my ID is correct.
function ViewPM(field1) {
window.top.document.getElementById("tbProjectPM").value = field1;
document.getElementById("btnClosePM").click();
}
It seems that both window.top.document.getElementById and document.getElementById are not functioning as expected.