This is complicated as, the content in the model window can be either on the page that you are calling the parent or it could be on a separate page in either an iframe, or perhaps even loaded via Ajax. The easiest way would be to have it be on the page. That way, it's all one page and there is no parent/child barrier to cross.
The second easiest is if it is an iframe, then objects on the top page are known by the same identifier that they are know by on the top page with the prefix of parent. added. For example, if you have a select named 'choice1' in a form named 'choices', it would be known on the top page as:
Code:
document.forms['choices']['choice1']
and in the iframe as:
Code:
parent.document.forms['choices']['choice1']
The hardest is with Ajax added content, it will exhibit the same ease of access as content that is already on the page, except where it comes to initializing javascript actions, then it can become very complex. I'd recommend against using it if it gives you any problems.
Bookmarks