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)

1 Answer 1


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, 2014 at 19:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .