Permission Denied when accessing parent from child window

Hi,
I have a window that uses Javascript to add rows to an HTML table on its parent window.  That works fine and I then press 'save' on the parent window to commit it to the database and refresh the screen with the new data.
However, when I again try to access the parent window's element from the child's (even just referencing some component), I get a Permission Denied javascript error.  It seems like when the parent window refreshes, the image of its contents changes (although the content are the same).  For example, trying table.addRow, deleteRow, or even referencing table.rows.length, cause the error.  Both windows are in the same domain so cross-site scripting restrictions shouldn't be an issue.  I'm using ie7.
Is there a way for the child window to reference the parent after the parent refresh, or is there another issue involved?  
Thanks
LVL 1
leclaudeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

abelCommented:
Unfortunately, there's indeed another issue involved. The child window only has access to the parent window if the parent window created the child window (confusing, I know, but that's how it works). This is a security measurement, to prevent you from popping up a window that can gain control over any other window, whether they show google.com, experts-exchange.com or your site.

This is one of those security cases where the good guys suffer from the behavior of the bad guys. But other then instructing your users to lower their security, or to close and reopen your child window, you cannot do much I'm afraid.
0
abelCommented:
A little update whilst thinking it over: one thing that will work is putting your parent window inside a frame (or iframe). The inner frame will have access to the parent window, and your child window will not loose the access to the parent window.

There may be other techniques that I currently cannot think of, to go around this restriction.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leclaudeAuthor Commented:
I was actually able to fix this.  I was setting the variable that held the parent element items to null if the element wasn't found.  Instead I need to re-reference it when the page refreshes and that fixed the problem.
0
abelCommented:
Glad you sorted it out. You can select your own comment as answer, or select your own comment as answer and give some points for the effort the expert(s) have invested in helping you... ;)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.