to set value parent page's frame from popup.

Posted by cem on Stack Overflow See other posts from Stack Overflow or by cem
Published on 2010-06-08T12:31:41Z Indexed on 2010/06/08 13:22 UTC
Read the original article Hit count: 198

Filed under:
|

I want to set label's value from popup.But label is in frame and I dont know how to achieve it from popup. From parent page,i get this label by following javascript function.

But when I use this function in popup page, I cant find topframe.Do u have any solution about how to success it?

if (window.parent.document.getElementById('lbl')) 
{
    window.parent.document.getElementById('lbl').innerText = sender.getSelectedItem().get_text();
}
else
{ 
    window.parent.frames['topFrame'].document.getElementById('lbl').innerText = sender.getSelectedItem().get_text();
}

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about JavaScript