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


Groups > comp.lang.javascript > #37020

Re: Firefox changed IFRAME behaviour - I need a remedy??

Newsgroups comp.lang.javascript
Date 2019-08-02 02:37 -0700
References <bd03eafc-e3ae-46a6-964f-f7bf8d4ccb37@googlegroups.com> <593a3b98-6915-4561-b4df-0b096d1cdd56@googlegroups.com> <c7b06d06-f596-464b-9f76-a694e940d4bd@googlegroups.com> <0d372bee-66f1-4aa6-9b15-2b802c70c1a6@googlegroups.com> <qhsf8d$bni$1@gioia.aioe.org>
Message-ID <4a0f55db-a21c-4fb1-aec3-e678e40b41e0@googlegroups.com> (permalink)
Subject Re: Firefox changed IFRAME behaviour - I need a remedy??
From dr.j.r.stockton@gmail.com

Show all headers | View raw


On Wednesday, 31 July 2019 17:22:44 UTC+1, R.Wieser  wrote:
> John,
> 
> > In an HTA using JScript or VBScript, can I read a local
> > plaintext file of extension TXT or HTM into a single string,
> > and if so what do I need;
> 
> Using VBScript you certainly can.  This is what I use myself (keyword: 
> "ReadAll")
> 
>   set oSrcFile = oFS.opentextfile(sSrcFile,1)
>     sFileDat = oSrcFile.ReadAll
>   oSrcFile.Close
> 
> I have no experience with JScript in this regard though.


I just needed to realise that 'oFS' must be equivalent to what a
certain pseudo-book names 'fso' !

Converting those parts of VBScript which are not in ECMAScript
and the usual browser's DOM, for a JScript system which includes
the corresponding functions, is really rather easy.

I use http://wsh2.uw.hu/index.html which is for both VBscript
and JScript; it is undoubtedly comprehensive (for its time)
but I find its presentation uncongenial.  But, now I know
the answer to my question, I'm virtually certain that I could
easily find the answer there.

The following does what I have been doing with an IFRAME,
except that I have been loading the frame from a file and
reading its contents as a page's tree of elements, and this
reads the file as a string and loads it into a page-like
tree of elements at 'xxx'.


var fso = new ActiveXObject("Scripting.FileSystemObject")
// ...
var sSrcFile = "C:\\homepage\\$contact.htm"
var oSrcFile = fso.opentextfile(sSrcFile, ForReading) 
var sFileDat = oSrcFile.ReadAll()
oSrcFile.Close()	// para after Rudy Wieser in c.l.j
// ...
alert(sFileDat)
document.getElementById('xxx').innerHTML = sFileDat


Other tests have shown that xxx will now contain a structure
matching the DOM tree of $contact.htm - or maybe I'll have to
load sFileDat into a second window to make it have its own
individual arrays(/collections?) of links and anchors rather
than sharing with the page being executed.

Thanks,

-- 
  (c) John Stockton, near London, UK.  Using Google Groups.           |
 Mail: J.R.""""""""@physics.org - or as Reply-To, if any.             |

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


Thread

Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-07-20 12:53 -0700
  Re: Firefox changed IFRAME behaviour - I need a remedy?? Andrew Poulos <ap_prog@hotmail.com> - 2019-07-21 15:15 +1000
  Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-07-22 03:07 -0700
  Re: Firefox changed IFRAME behaviour - I need a remedy?? Martin Honnen <martin.honnen@gmx.de> - 2019-07-22 16:20 +0200
    Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-07-30 08:20 -0700
  Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-07-30 18:24 -0700
    Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-07-31 04:14 -0700
      Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-07-31 05:32 -0700
        Re: Firefox changed IFRAME behaviour - I need a remedy?? "R.Wieser" <address@not.available> - 2019-07-31 18:22 +0200
          Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-08-02 02:37 -0700
            Re: Firefox changed IFRAME behaviour - I need a remedy?? "R.Wieser" <address@not.available> - 2019-08-02 13:38 +0200
              Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-08-02 05:59 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? "R.Wieser" <address@not.available> - 2019-08-02 17:55 +0200
                Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-02 15:57 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-08-03 06:11 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-08-04 11:44 +0200
              Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-02 15:10 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? "R.Wieser" <address@not.available> - 2019-08-03 08:59 +0200
                OT: Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-08-03 05:18 -0700
                Re: OT: Re: Firefox changed IFRAME behaviour - I need a remedy?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-08-03 15:27 +0200
                Re: OT: Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-08-03 09:28 -0700
                Re: OT: Re: Firefox changed IFRAME behaviour - I need a remedy?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-08-04 12:32 +0200
                Re: Firefox changed IFRAME behaviour - I need a remedy?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-08-04 11:30 +0200
                Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-04 15:31 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-08-05 13:48 +0200
                Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-05 16:51 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-08-07 01:42 +0200
                Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-07 01:47 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-08-08 20:56 +0200
                Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-08 13:16 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2019-08-08 23:57 -0600
                Re: Firefox changed IFRAME behaviour - I need a remedy?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-08-09 12:48 +0200
                Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-08-05 06:37 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-08-05 18:46 +0100
                Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-08-06 03:39 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-05 17:30 -0700
            Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-02 15:05 -0700
      Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-07-31 18:58 -0700
        Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-08-02 05:01 -0700
          Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-02 16:07 -0700
            Re: Firefox changed IFRAME behaviour - I need a remedy?? dr.j.r.stockton@gmail.com - 2019-08-03 08:19 -0700
              Re: Firefox changed IFRAME behaviour - I need a remedy?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-03 18:42 -0700
                Re: Firefox changed IFRAME behaviour - I need a remedy?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-08-04 11:27 +0200

csiph-web