0

i have a website of a customer like the following code.

The admin of this site let me put my own javascript ( myScript.js ). How can i change from this point (DOM Operations ?) the given iframe width from 160px to 200px ?

<div id="iframeDiv">
<iframe width="160px" scrolling="no" src=/test/placement_content.jsp">
    <html>
        <body>
        <script src="myScript.js">
        ...
        ..
        .

Thank you very much for advice. Best Regards,

1 Answers1

0

See here to learn about writing JavaScript code that can affect a parent document when your script is loaded in a document in an iframe. Note this only works when both the parent document and child document are within the same domain.

You should be able to get the 'iFrameDiv' element on the parent, find the child that is your iframe, and manipulate the width

Community
  • 1
  • 1
scott.korin
  • 2,458
  • 2
  • 21
  • 34