0

I'm a Java programmer, so I'm not just coming in here (completely)n00b-like. My boss just asked me to work on a project and after speaking with an engineer for the client company, I need to create a responsive iframe using pym.js. Problem is, I've never learned JavaScript. After reading through some docs and taking some udemy courses, I have the basics down. But there are only 6 questions regarding this pym.js on StackOverflow. I cannot for the life of me figure out how to use it.

Do I need to do something like this in the <head>...</head>:

<script src="[insert pym.js source here]"></script>

Also, I don't have access to the source files for the site that this is going to. Can still make my "child" iframe responsive based on "parent" width?

Any help would be much appreciated.

EDIT

This is what I have so far, hoping this is right.

index.html

<body> <script type="text/javascript" src="https://pym.nprapps.org/pym.v1.js"></script> <div id="embed-1">
</div> <script type="text/javascript"> new pym.Parent("embed-1", "iframe.html"); </script> </body>

iframe.html

<body> <script type="text/javascript" src="https://pym.nprapps.org/pym.v1.js"></script> </body>

David Cash
  • 29
  • 6
  • Idk but this seems to be pretty clear even if you have basic knowledge of javascript : http://blog.apps.npr.org/pym.js/, pretty much tells you what to call, what to put and where tu put it. The rest is taken care of by the library ... – WilomGfx Nov 18 '17 at 07:06

2 Answers2

0

May be include pym.js and do new pym.Child(); in the child page.

Here is the reference http://blog.apps.npr.org/pym.js/

kamal soni
  • 11
  • 1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/30131393) – Mark S. Oct 20 '21 at 19:43
-1

Its seems you are doing correctly but i am just new at stackoverflow but after doing your code over my system and tested on different OS (ubuntu, Windows and Mac) they all are working fine.

Lyderx05
  • 13
  • 1