Guest jana Posted April 5, 2011 Report Share Posted April 5, 2011 Hi All, I have two pages, one is hosted in iis and another one is hosted in apache, iis web server page has iframe, hidden field and its value, i am trying to access this hidden field value via Java script which is hosted using apache web server by following script. this script was called onload event of the body tag. function onbdyload() { var a=parent.document.getElementById("hdn").value; return false; } but it says that "access denied". Thanks in advance. Thanks & Regards Janrthanan Quote Link to comment Share on other sites More sharing options...
BeeDev Posted April 5, 2011 Report Share Posted April 5, 2011 I don't think that's possible due to security issues. But you can do it the other way around, access a field in an iframe from the parent window. Using jquery you can grab such an element like this: $('#element', $('iframe').get(0).contentDocument) Quote Link to comment Share on other sites More sharing options...
LSW Posted April 5, 2011 Report Share Posted April 5, 2011 You posted this in the Introduce yourself forum, I moved it. Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.