I have a VF page (controller extension) which contains an iframe and a submit button within it. The iframe source points to another page. The source of this iframe is dynamically determined by a parameter from the parent page. Both the pages contain some inputtext values to be saved.

The question is how do I access the elements of iframe page and set their values within the parent page. The goal is to save values of all the elements. I am relatively new to VF and not able to dig deep into this.

This is what I tried - Set the value of apex:param to that of the iframe element using window.frames['iframename'].document.getElementByID(''Elementoninnerpage'). I'm not sure if this was the right way, but its not working (Its setting the whole text window.frames....as value)


This can be achieved if both the domains of parent page and iframe page are same. Else, we will get cross domain script error.

  • helpSFDC, please share your code, that way is easier to help you
    – Carlos
    Sep 30 '14 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.