[Javascript] Re: Javascript Digest, Vol 5, Issue 10

Chris Tifer christ at saeweb.com
Tue Jul 15 07:41:51 CDT 2003


That's what I would do. Go off of a variable that should let
you know whether you're ready to call a function or not.

Chris Tifer
http://emailajoke.com

----- Original Message -----
From: "Bob and Sharon Hiller" <rhiller at shianet.org>
To: <javascript at LaTech.edu>
Sent: Monday, July 14, 2003 9:17 PM
Subject: [Javascript] Re: Javascript Digest, Vol 5, Issue 10


> could you give me an example?
> How would i check to see if the function exists without receiving an
error?
> Maybe set a variable in the external javascript and check to see if the
> variable is null?
>
> ----- Original Message -----
> From: <javascript-request at LaTech.edu>
> To: <javascript at LaTech.edu>
> Sent: Sunday, July 13, 2003 1:00 PM
> Subject: Javascript Digest, Vol 5, Issue 10
>
>
> > Send Javascript mailing list submissions to
> > javascript at LaTech.edu
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> > or, via email, send a message with subject or body 'help' to
> > javascript-request at LaTech.edu
> >
> > You can reach the person managing the list at
> > javascript-owner at LaTech.edu
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Javascript digest..."
> >
> >
> > Today's Topics:
> >
> >    1. Re: downloading javascript (Laurent Goffin)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Sun, 13 Jul 2003 11:22:51 +0200
> > From: "Laurent Goffin" <lgoffin at wonderweb.net>
> > Subject: Re: [Javascript] downloading javascript
> > To: "[JavaScript List]" <javascript at LaTech.edu>
> > Message-ID: <012401c34920$56fa4810$0202a8c0 at emakina.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > >3. Could the html be so small that the javascript does not have time to
> download?  The javascript is 9kb.
> > >4. How is a page loaded?  ie starts with the html and as soon as
external
> import is found, downloads the javascript?  when the end html is found
does
> all downloads stop?
> >
> > Right,
> >
> > there are chances that ur javascript is not yet loaded when the HTML
page
> call for the functions...
> > I dont mean not yet downloaded but when the HTML page is loading, the
> browser interpret HTML and create a DOM out of this. In the mean time, he
is
> downloading the JS external file and when the file is dlowloaded or
present
> in the cache, the browser is interpreting all functions in order to make
> them available by the page.
> >
> > For instance, when the BODY of your page is calling on onload event a
> function in ur external JS, it's possible the JS is already downloaded but
> the function does not exist yet for the browser.
> >
> > It's the same too when a JS function try to call an HTML object while
the
> page is not fully loaded yet (check onreadystate event for this)
> >
> > A solution to this : when u call the first function and this function
does
> not exist yet, just call instead a function which is a timeout checking if
> the other function exist. When the function exist, just call it and stop
> timeout.
> >
> > Thsi require of course the timeout function to be outside of the JS
> file...
> >
> > Have a nice day
> >
> > L. Goffin
> >
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
>
http://lists.LaTech.edu/pipermail/javascript/attachments/20030713/3b2bb0b6/a
> ttachment-0001.html
> >
> > ------------------------------
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> >
> >
> > End of Javascript Digest, Vol 5, Issue 10
> > *****************************************
> >
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list