SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    USA
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    javascript loading

    Hi All,

    I have a JSP with lots of javascript liabraries. Sometimes it takes long time to load all the libraries. I want to grey all the form fields till loading of javascript is complete. Is there any to figure out loading of js complete?

    thanks,

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    You can have your very last script be the one that ungreys the form fields
    When that last script has loaded, the others will have already been processed.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Nov 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    What are you using to load the javascript?
    If you have embeded <script src="..." type="text/javascript" statements, in the html, then I think all javascript must be loaded before the document will render.

    Are you using Script Tag Creation, or on-demand javascript?

    I may start another post with the question I have about getting the Script Tag creation to work properly. Its more flexible than XHR. (XMLHttpRequest) Call because you can use other domains.

  4. #4
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    USA
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have straightforward <Script src=""....> tag. Still sometimes we see all the form elements, but functions are not working. I mean page appears to be still loading.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •