[Javascript] Any creative way to pull htmlcontentsamewayjsfilesare pulled

DEV dev at qroute.net
Fri Apr 4 11:59:58 CST 2003


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



More information about the Javascript mailing list