Skip to Content
Former Member
Oct 26, 2015 at 03:20 PM

Iframe in sapui5 xml views


Hi all,

i am using iframe inside my XML views , i need to change the src attributes of the iframe dynamically,

in that i am using google doc viewer

while i am trying to set src of iframe its giving 'SAMEORIGIN' issue,

but if we fixed the same url then it is working fine.

below code is for iframe in xml view,

<html:iframe target='_top' src="" id ="attachmentframe" height="100%" width="100%">


if user clicks on a button i am trying to change the src of iframe as follows

document.getElementById("__xmlview4--attachmentframe").src = pathFormed

if we are placing the same url in pathFormed varaibale it will giving error.

can you any one help .