471,831 Members | 770 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,831 software developers and data experts.

Frames Cross-Domain issue

150 100+
i have 3 frames on on the right and other on the left , the right frame submit data by java script,the left frame i need to get the current elements on the right frame by javascript i used this code :

Expand|Select|Wrap|Line Numbers
  1. var myIFrame = parent.document.getElementById(iFrameName);
  2. var theiframebody = (myIFrame.contentDocument)? myIFrame.contentDocument.body: myIFrame.Document.body;
  3. try{
  4.     alert(myIFrame.theiframebody.getElementById('element').value);
  5. }catch(e){
  6.     alert('error');
  7. }
it give me an error permission is denied or access is denied , how can bypass this error and get the elements ?
Apr 4 '09 #1
5 2818
dmjpro
2,476 2GB
Have a look at this
I think it may help you..
Apr 4 '09 #2
smartic
150 100+
this code he have control on both pages put i can't control one the frames?
Apr 5 '09 #3
acoder
16,027 Expert Mod 8TB
Then use a server-side proxy as suggested in one of the earlier posts, i.e. serve the page from the other domain from your server.
Apr 5 '09 #4
smartic
150 100+
i used Web Proxy for Cross-Domain put i have an error ( 405 not allowed nginx )
Apr 6 '09 #5
acoder
16,027 Expert Mod 8TB
It usually means you're using the wrong method to access the page. How are you accessing the page? Are you posting to it?
Apr 6 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Frédéric Mayot | last post: by
2 posts views Thread by Flat Earth | last post: by
4 posts views Thread by Kai Grossjohann | last post: by
3 posts views Thread by ShadowMan | last post: by
1 post views Thread by GodFoca | last post: by
6 posts views Thread by hemant_mishal | last post: by
4 posts views Thread by Raffi | last post: by
56 posts views Thread by Deepan HTML | last post: by
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.