I tried:
parent.MYFRAME.document.getElementById("LHS");
and i get a "Access Denied"
is there a way to do this ?
thanks in advance
If the iframe src from the same domain as the parent document?
There's a new jQuery plugin that was just released yesterday that
might help you: http://groups.google.com/group/jquery-en/browse_thread/thread/e1b2c367f354aead/
You should be using just:
parent.document.getElementById("LHS")
That is, the MYFRAME bit shouldn't be there.
Also, the document loaded within the iframe needs to be on the same
server as the parent document. Javascript can't access documents
across different domains for security reasons.
wp.
when I use
parent.document.getElementById("LHS")
i get "Access Denied" can you please help ?
Is the document within the iframe on the same server, at the same
domain, as the parent document that is hosting the iframe? If not, you
will get the permission denied error.
wp.
Same domain required: yes (with an exception)
Same *server* required: Not even close.
The exception is sub-domains with the document.domain property set.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
I did not say that the same server is required, not did I mean to
imply that - sorry if I was unclear. I was trying to whittle down the
possible problems by getting a clearer idea of the situation.
wp.