Hi,
I have a webpage which is splitted into 2 frames. Frame 1(page1.jsp) loads the information in frame 2(page2.jsp) onclick of a link. Later frame 2 redirected to different page(page3.jsp) based on business requirement.
Now if i click the same link on frame 1(page 1) while page3.jsp is on frame 2, I am having issues accessing the page2 elements in frame 2.
Here is the sample of piece of code.
1. First loading the page2.jsp in frame 2
2. Accessing page 2 elements and assigning value
Actually what is happening is that, it loads the page2 successfully without any issues. But the value is not getting set as given in the second statement. If I try to put some alert statement in the end, I too see the value, but once the javascript function is executed, the value disappears in second page.
function loadPage2(){
window.top.frames["frame2"].location.href="page2.jsp";
window.top.frames["frame2"].document.getElementById("name").innerHTML = "TestService";
}
Any help appreciated.
Regards,
Siva