[Javascript] Any creative waytopullhtmlcontentsamewayjsfilesarepulled

David T. Lovering dlovering at gazos.com
Fri Apr 4 23:25:20 CST 2003


Ah, but some of those 'place-holders' are for DIVs and the like which are sufficiently complex as to require a heaping-helping of time to paint (particularly if they have a lot of layers and dynamic code being fed from a remote database).  Not everything
that is "ugly" time-wise is an illustration, albeit a lot of them qualify.
Still on the hunt for a "real" end-of-loading event handle that works in both Netscape/Mozilla and IE.  Only another 986 more event descriptors to paw through...

-- Dave Lovering

DEV wrote:
> 
> Clever !.  You hit it right on the target.
> I think we are on a roll here.
> 
> ----- Original Message -----
> From: "Michael Dougherty" <Michael_Dougherty at PBP.com>
> To: <javascript at LaTech.edu>
> Sent: Friday, April 04, 2003 1:53 PM
> Subject: RE: [Javascript] Any creative way
> topullhtmlcontentsamewayjsfilesarepulled
> 
> > Write a wrapper for the downloaded page:
> >
> > <iframe src='/IncludePackager.asp?File=FileToInclude.htm'>
> >
> > Then have the IncludePackager.asp give you the contents of
> FileToInclude.htm
> > as well as your control variable
> >
> > If you're using IIS5/ASP3, you could do this for the contents of
> > IncludePackager.asp
> > <%
> > Server.Execute( Request.QueryString("File") )
> > %>
> > <!-- #include virtual="/IFrameControlModule.htm" -->
> >
> > Using this strategy, you could include the dynamic content of .ASP files
> > into your IFrame.
> >
> >
> > I have not worked with other servers or CGI strategies, so i have no idea
> if
> > there is an analog :(
> >
> >
> > -----Original Message-----
> > From: javascript at LaTech.edu [mailto:javascript at LaTech.edu]
> > Sent: Friday, April 04, 2003 1:46 PM
> > To: javascript at latech.edu
> > Subject: Re: [Javascript] Any creative way to
> > pullhtmlcontentsamewayjsfilesarepulled
> >
> >
> > >>   The problem is that the HTML build is (for all intents and purposes)
> a
> > >> multi-threaded process.  Things will come up on your screen as little
> > boxes
> > >> with red-X's or "broken code" object icons, while the stuff below them
> > gets
> > >> put together.  Then, as the various elements complete loading, the
> > >little
> > x
> > >> bodes or broken-code icons will be replaced by the elements they were
> > acting
> > >> for as place holders.  Hence, your 'I_am_done' variable might get built
> > >a
> > >> lot sooner than you anticipate.
> >
> >
> > Yes, but I do not think that as an issue in practical life. All those
> place
> > holders are for the resource files such as images.
> > So, regardless of whether those resource references being fully downloaded
> > in the frame or not, the innerHTML value will never change. When the
> > innerHTML content is written into the main browser, images will be
> referred
> > as document .write ("<img src='thatHalfWayLoadedImage.jpg'>").
> > And the effect of this is that container window that gets the newly
> written
> > *<img src='thatHalfWayLoadedImage.jpg'>* call will now trigger itself to
> > request that resource file. If that file happens to be loaded in the
> > borderless frame already,  main browser will most likely to refer to the
> > cache copy.
> >
> > With this in mind, I do not see it as a show stopper.
> >
> > This new approach which we are experimenting in a conceptual method looks
> > quite promising for the future.
> > However there is one aspect of it that bothers me big time. And that is to
> > add that one bottom liner which needs to go in all the content.htm files.
> > In
> > this regard, this is inferior to the functionality of the server.include.
> > In
> > that technology, you do not change the source files a bit. !...
> >
> > And how pity is that we have to go thru these timers and I_am_done
> variable
> > values just because the onLoad is not a reliable event. Very frustrating
> > indeed when you have a method that does NOT do what it is programmed to
> do.
> >
> > I suggest or explore all avenues to find a reliable work around to this.
> > Don't you think so ?
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "David Lovering" <dlovering at gazos.com>
> > To: "[JavaScript List]" <javascript at LaTech.edu>
> > Sent: Friday, April 04, 2003 11:10 AM
> > Subject: Re: [Javascript] Any creative way to
> > pullhtmlcontentsamewayjsfilesarepulled
> >
> >
> > >>   I think your idea has a lot of merit, but I'd like to add one caveat
> > >--
> > >>
> > >>   I've tried setting a bogus variable at the bottom of a load for an
> > >HTML
> > >> document and using it as a flag to tell whether the window is fully
> > "built".
> > >> I'm here to tell you it doesn't work -- at least not reliably, and not
> > 100%
> > >> of the time.
> > >>
> > >>   The problem is that the HTML build is (for all intents and purposes)
> a
> > >> multi-threaded process.  Things will come up on your screen as little
> > boxes
> > >> with red-X's or "broken code" object icons, while the stuff below them
> > gets
> > >> put together.  Then, as the various elements complete loading, the
> > >little
> > x
> > >> bodes or broken-code icons will be replaced by the elements they were
> > acting
> > >> for as place holders.  Hence, your 'I_am_done' variable might get built
> > >a
> > >> lot sooner than you anticipate.
> > >>
> > >>   The method I'm exploring (as an adjunct to your excellent idea of
> > >using
> > an
> > >> IFRAME wrapper) is to use a "document.watch()" call, with the
> > >appropriate
> > >> event used as a trigger within the watch.  The designated event handler
> > will
> > >> kick in, and the necessary action occur AT THE DOCUMENT LEVEL, rather
> > >than
> > >> as a consequence of a single changed variable field.  Sort of like an
> > >> 'onLoad' event, but rather one that works AFTER the build, rather than
> > >at
> > >> the start.  (onLoad is awfully nebulous -- it doesn't really kick in
> > >after
> > >> the load is complete, and it doesn't really kick in at the very
> earliest
> > >> beginning before any objects are on the page.  In short, it is
> dangerous
> > to
> > >> rely on onLoad.)  I think if I can build an event trap handler around
> > >the
> > >> right event [and there are literally hundreds of them] this might
> > >actually
> > >> work pretty well.
> > >>
> > >>   One rather crude method is to write the file that goes into the
> > >> zero-dimensioned IFRAME window with some kind of loop that does a
> > >> document.close() once the last line is in place.  The document.close()
> > >is
> > >> one thing I know I can pick up on with a 'watch()' handler.
> > >>
> > >>   Anyway, I'm still in the preliminary research stage on this.
> > >>
> > >>   -- Dave Lovering
> > >>
> > >> ----- Original Message -----
> > >> From: "DEV" <dev at qroute.net>
> > >> To: "[JavaScript List]" <javascript at LaTech.edu>
> > >> Sent: Friday, April 04, 2003 10:59 AM
> > >> Subject: Re: [Javascript] Any creative way to
> > >> pullhtmlcontentsamewayjsfilesare pulled
> > >>
> > >>
> > >> > How about this idea that I posted in the ASP list a few minutes ago.
> I
> > >> think
> > >> > it is worth sharing with you.
> > >> >
> > >> > But I have just thought of a trick towards accomplishing my initial
> > goal.
> > >> It
> > >> > is a creative way and it might just work.
> > >> > Here are the steps for those who are interested;
> > >> >
> > >> >
> > >> > Have an iframe and ship your front page formatted htm content ( say
> > >> > myContent.htm ) from your server as is.
> > >> > And set the width and height of that iframe to 0 so it does not show
> > >up
> > on
> > >> > the client screen.
> > >> >
> > >> > Now, Set a JS timer on the main page ( which contains the 0 border
> > >> iframe ).
> > >> > Let that timer keep an eye on a variable value just to see if it is
> > >true
> > >> or
> > >> > false. Until it is seen as true,  keep on running that timer querying
> > say
> > >> > 10rps.
> > >> >
> > >> > How is that variable change its initial value from false to true ?
> > >> > That will be carried out by the last line ( parent.ThatVariable=true
> > >)
> > in
> > >> > the document in the iframe. The pure purpose in this whole business
> is
> > to
> > >> > let the parent ( the container document of the iframe ) know that
> "the
> > >> > iframe has loaded in its entirety"....  There could be better ways of
> >
> > >> doing
> > >> > this but this also does the job right. Maybe there is a way one can
> > query
> > >> an
> > >> > iframe window to see when it completes its loading.
> > >> >
> > >> > Anyway when the timer senses the fact that iframe is done, fires a
> > >> procedure
> > >> > and terminates itself.
> > >> > The procedure then takes over and uses the innerHTML method.
> > >> >
> > >> > Aha !.. Now the js routines has all the power to do what it needs to
> > >be
> > >> done
> > >> > by that innerHTML code. Do all sorts of replace strings and
> > >> document.writes
> > >> > !...
> > >> >
> > >> > Since the JS procedures runs before the browser page lays out takes
> > place,
> > >> > you will never run into the issues of scrollbars appearing in the
> > >middle
> > >> of
> > >> > your page, just because you wanted to do the include abstraction on
> > >the
> > >> > client.
> > >> >
> > >> > With that, one gets the iframe power without the scroll bars effect
> > >and
> > >> > without worrying about dhtml menu roll overs etc.
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > ----- Original Message -----
> > >> > From: "David Lovering" <dlovering at gazos.com>
> > >> > To: "[JavaScript List]" <javascript at LaTech.edu>
> > >> > Sent: Monday, March 31, 2003 7:49 PM
> > >> > Subject: Re: [Javascript] Any creative way to pull
> > >> > htmlcontentsamewayjsfilesare pulled
> > >> >
> > >> >
> > >> > > The 'move-around-a-big-pane-just-like-Acrobat' window effect can be
> > >> > achieved
> > >> > > by using a rather complex interlinkage of window.offset attribute
> > >> changes
> > >> > > tied to the cursor 'pegging out' on the window boundaries.  The
> > >> > > 'hand-drag-the-whole-window' function can be achieved (in theory)
> by
> > >> > > window.moveTo and window.moveBy directives, again linked to the
> > >> mouse-drag
> > >> > > events.
> > >> > >
> > >> > > The mechanics are somewhat brutal, as you have to update the screen
> > >> > geometry
> > >> > > on the same timescale as a keyboard/mouse-button debounce (roughly
> > >> 50ms).
> > >> > >
> > >> > > However, I'm ressurecting my memories of how to do it, and may be
> > >able
> > >> to
> > >> > > hack something together over the next few days.  It is just close
> > enough
> > >> > to
> > >> > > being impossible to interest me.  [I specialize in the impossible].
> > >> > >
> > >> > > -- Dave Lovering
> > >> > >
> > >> > > ----- Original Message -----
> > >> > > From: "BEKIM BACAJ" <trojani2000 at hotmail.com>
> > >> > > To: <javascript at LaTech.edu>
> > >> > > Sent: Monday, March 31, 2003 7:02 PM
> > >> > > Subject: Re: [Javascript] Any creative way to pull html
> > >> > > contentsamewayjsfilesare pulled
> > >> > >
> > >> > >
> > >> > > > Thanks David,
> > >> > > > I never heard about anything like DynApi's nor similar untill
> > tonight.
> > >> > > > As I browse the internet, I find out that DynApi is nothin but a
> > huge
> > >> > > > collection - library, of reusable scripts, and can't do anything
> > >> > > > particularly advanced, comparing to other hand witten scripts.
> > >> > > >
> > >> > > > I will submit some scripts of my own, that one can find them less
> > >> > > practical
> > >> > > > than entertaining, something like making page elements absolutely
> > >> > > > positioned, after this becoming able to move them across the
> page,
> > >> > > recording
> > >> > > > the move, playing it back or backwards, and what is most
> important
> > for
> > >> > me,
> > >> > > > very short (few lines) and very fast executionable.
> > >> > > >
> > >> > > > At end, why write a script when one is ready to share it.
> > >> > > >
> > >> > > > Looking forward in reading from you.
> > >> > > >
> > >> > > >                                       Regards, Bekim.
> > >> > > >
> > >> > > >
> > >> > > > >From: "David Lovering" <dlovering at gazos.com>
> > >> > > > >Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
> > >> > > > >To: "[JavaScript List]" <javascript at LaTech.edu>
> > >> > > > >Subject: Re: [Javascript] Any creative way to pull html content
> > >> > > > >samewayjsfilesare pulled
> > >> > > > >Date: Mon, 31 Mar 2003 18:31:59 -0700
> > >> > > > >
> > >> > > > >I once had to do it for a CAD/CAM viewing tool that worked with
> > >> D-sized
> > >> > > > >drawings that were posted to the web.  ARGGH!  It was
> > >comparatively
> > >> > > nasty,
> > >> > > > >but I'll see what I can recall of the various tricks that were
> > >> needed.
> > >> > > > >
> > >> > > > >I don't believe DynApi is REALLY necessary, as I figured out how
> > >to
> > >> do
> > >> > it
> > >> > > > >before the product ever existed.
> > >> > > > >
> > >> > > > >I'll get back to the list once I've had a chance to study the
> > >issue
> > >> in
> > >> > > > >depth.
> > >> > > > >
> > >> > > > >-- Dave Lovering
> > >> > > >
> > >> > > >
> > >> > > > _________________________________________________________________
> > >> > > > Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> > >> > > > http://join.msn.com/?page=features/junkmail
> > >> > > >
> > >> > > > _______________________________________________
> > >> > > > Javascript mailing list
> > >> > > > Javascript at LaTech.edu
> > >> > > > https://lists.LaTech.edu/mailman/listinfo/javascript
> > >> > > >
> > >> > > >
> > >> > >
> > >> > >
> > >> > > _______________________________________________
> > >> > > Javascript mailing list
> > >> > > Javascript at LaTech.edu
> > >> > > https://lists.LaTech.edu/mailman/listinfo/javascript
> > >> >
> > >> > _______________________________________________
> > >> > Javascript mailing list
> > >> > Javascript at LaTech.edu
> > >> > https://lists.LaTech.edu/mailman/listinfo/javascript
> > >> >
> > >> >
> > >>
> > >>
> > >> _______________________________________________
> > >> Javascript mailing list
> > >> Javascript at LaTech.edu
> > >> https://lists.LaTech.edu/mailman/listinfo/javascript
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript


More information about the Javascript mailing list