Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #32350

Re: Adding section into page

Newsgroups comp.lang.javascript
Date 2017-01-25 17:51 -0800
References <BJhJnbcqB$gYFwL8@invalid.uk.co.demon.merlyn.invalid> <o62jm4$kks$1@dont-email.me> <kC3wFKr3QphYFwHG@invalid.uk.co.demon.merlyn.invalid> <927fba05-644b-4fae-a2e7-d956b09e4324@googlegroups.com>
Message-ID <a21ab072-0975-4fbb-ba84-85870a016bbd@googlegroups.com> (permalink)
Subject Re: Adding section into page
From "Michael Haufe (TNO)" <tno@thenewobjective.com>

Show all headers | View raw


On Wednesday, January 25, 2017 at 4:30:14 PM UTC-6, Dr J R Stockton wrote:
> On Monday, January 23, 2017 at 11:45:49 PM UTC, Dr J R Stockton wrote:
> 
> > Function XXX will get the body of the content of Ifr and move it into
> > the document as a DOM sub-tree within the aforesaid div element instead
> > of "Fail 263", then exit.
> > 
> > Something like that might serve, if it can be made to work.
> 
> The rest of the job I can do, since for that I can use parts of other
> pages of mine, adjusted.
> 
> For the moment, in lieu of function XXX, I load a static IFRAME
> with src file, written in HTML.  Then I use
> 
> function MoveIframeContent() {
>   var SRC = document.getElementById("Ifr")
>   var Branch = SRC.contentDocument.body
>   var Unto = document.getElementById("filename")
>   Unto.appendChild(Branch) // OK for test
>   }
> 
> to *transfer* the content of the IFRAME to a static DIV,
> appendChild being the first helpful method that came to mind.
> 
> It works in Firefox and in MSIE, but not in Opera Chrome
> and Vivaldi, in which no transfer occurs.  It might
> work in those three if I were using a Web server
> rather than reading files directly from disc, which
> is how the HTML will mostly be used.  I should have
> remembered that the same applies to my local links checker -
> evidently it is because of over-zealous misapplication of
> the Same Origin Policy.  I assume that I cannot work round
> that using only script on the importing page.
> 
> So, perhaps, 
> 
>   <iframe style="width:100%;"
>     src="rhubarb.htm" onload="Procrustes(this)">
>     Fail 547
>     </iframe>
> 
> with something like
>   function Procrustes(Ifr) {
>     Ifr.style.height = Ifr.contentDocument.documentElement.scrollHeight+"px"
>     }
> 
> Comment?  In Windows XP pro sp3, it works in Firefox 50.1.0
> and MS IE 8, but does not re-size in Chrome 49.0 or Opera 36.
> Can that be remedied (I suspect not)?

Was my earlier solution not appropriate?

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Adding section into page Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> - 2017-01-21 23:36 +0000
  Re: Adding section into page "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-22 00:47 +0100
  Re: Adding section into page Doc O'Leary  <droleary@2015usenet1.subsume.com> - 2017-01-22 15:38 +0000
    Re: Adding section into page Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> - 2017-01-23 23:39 +0000
      Re: Adding section into page "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-01-23 17:37 -0800
        Re: Adding section into page "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-01-23 17:38 -0800
      Re: Adding section into page Doc O'Leary  <droleary@2015usenet1.subsume.com> - 2017-01-24 02:54 +0000
        Re: Adding section into page Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2017-01-24 21:33 +0100
      Re: Adding section into page Dr J R Stockton <J.R.Stockton@physics.org> - 2017-01-25 14:30 -0800
        Re: Adding section into page "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-01-25 17:51 -0800
          Re: Adding section into page Dr J R Stockton <J.R.Stockton@physics.org> - 2017-01-26 04:17 -0800
            Re: Adding section into page "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-26 14:16 +0100
              Re: Adding section into page Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> - 2017-01-27 22:33 +0000
            Re: Adding section into page "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-01-27 06:34 -0800
  Re: Adding section into page "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-01-22 10:52 -0800
    Re: Adding section into page Ram Tobolski <ramtob@gmail.com> - 2017-01-23 08:50 -0800

csiph-web