I've a requirement, suppose there are 3 pages(A, B & C) for which the design is exactly same as the other. In this scenario i have reused a single page for all the three. I have placed these three pages inside a frame. On click of the button i'd determine which page should be loaded in the frame with the change of appropriate display names and values. After the page is submitted from the parent page, in the client side of the child page i have used a javascript which initializes the page to be loaded in the frame. Though the frame source is assigned, the page load method in the child page doesn't get called and the previously loaded page gets called. For example, when we move from A-> B, on click of the button in B, it doesnt go C, it goes to A and on click of the button the next time it moves to C.
The code which i've used,
Client side - child page if(document.DatabaseInfo.hdnNavigatePage.value != "" && window.top.appMain != null) { window.top.appMain.ChangeFrame(document.DatabaseInfo.hdnNavigatePage.value); } Java script this.ChangeFrame = function(source) { if(source != "") this.frameElements.src = source; }
Client side - child page
if(document.DatabaseInfo.hdnNavigatePage.value != "" && window.top.appMain != null)
{ window.top.appMain.ChangeFrame(document.DatabaseInfo.hdnNavigatePage.value); }
Java script
this
{
if(source != "")
this.frameElements.src = source;
}