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">
        ...
        ..
        .
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

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,537
  • 2
  • 23
  • 36