0

Can remove div from html page in iFrame. In the below code we are fetching html page and showing tht in iframe.. Can i remove from the html page fetching below.

<script type="text/javascript"> (function(){ document.write(['<iframe name="myfxbook_market" width="100%" height=' + height + ' frameborder="0" allowtransparency="true" hspace="0" vspace="0" marginheight="0" marginwidth="0" src=' + "http://widgets.myfxbook.com/widgets/calendar.html"+ps+"></iframe>"].join('')); }()); </script>"

Or is there any other way to edit this page before display ? Thanks for help.

  • remove the page? Just do not include the code? – epascarello Aug 29 '14 at 16:04
  • It is code for widget am adding in my site.. just want to edit it little bit before adding. It is fetching it from myfxbook.com. Thats not my site.. – user3845490 Aug 29 '14 at 16:08
  • What do you want to edit a bit? The code inside the iframe or the code that generates the iframe... – epascarello Aug 29 '14 at 16:15
  • You cannot modify the contents of the iFrame window with JavaScript unless you own both of these domains. – Ohgodwhy Aug 29 '14 at 16:19
  • possible duplicate of [jQuery/JavaScript: accessing contents of an iframe](http://stackoverflow.com/questions/364952/jquery-javascript-accessing-contents-of-an-iframe) – Athul AK Aug 29 '14 at 18:03

1 Answers1

0

Unfortunately, You’re not permitted to futz with iframes from other sites.

BUT, you can put it in a large iframe behind the rest of your page with z-index css and a lot more CSS.

have a look at this; jQuery/JavaScript: accessing contents of an iframe

Community
  • 1
  • 1
Athul AK
  • 358
  • 4
  • 15