on demand external source files

Discussion in 'Javascript' started by Tim Fooy, Nov 3, 2004.

  1. Tim Fooy

    Tim Fooy Guest

    Hi all,

    When i load my page, an external .js file gets loaded with it. Then when a
    user clicks on any of 10 different images, a different .js file should be
    loaded. Those files are quite large (> 100Kb) so i don't want to load them
    all during the initial load. Also, most users will not use all 10 of them.
    But is it possible to load an external .js file on the fly (or on demand)?
    This is a HTTP client-server interaction, so maybe it is only possible by
    completely reloading the page and loading the newly requested .js with it?..

    TIA

    regs,
    Tim
     
    Tim Fooy, Nov 3, 2004
    #1
    1. Advertising

  2. Tim Fooy

    Tim Fooy Guest

    Seems like this does the trick:
    http://www.webxpertz.net/forums/faq.php?faq=wxfaq_1_1_3#faq_wxfaq_1_1_3_1

    "Tim Fooy" wrote:
    > Hi all,
    >
    > When i load my page, an external .js file gets loaded with it. Then when

    a
    > user clicks on any of 10 different images, a different .js file should be
    > loaded. Those files are quite large (> 100Kb) so i don't want to load

    them
    > all during the initial load. Also, most users will not use all 10 of

    them.
    > But is it possible to load an external .js file on the fly (or on demand)?
    > This is a HTTP client-server interaction, so maybe it is only possible by
    > completely reloading the page and loading the newly requested .js with

    it?..
    >
    > TIA
    >
    > regs,
    > Tim
    >
    >
     
    Tim Fooy, Nov 3, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. robertm
    Replies:
    1
    Views:
    297
    Dino Chiesa [MSFT]
    Aug 12, 2003
  2. Jens Klingelhöfer

    How to send a website to a client without demand?

    Jens Klingelhöfer, Nov 30, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    331
    Steve C. Orr [MVP, MCSD]
    Dec 1, 2003
  3. Plutian

    Application on demand

    Plutian, Aug 30, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    431
    Ben Lovell
    Aug 30, 2004
  4. Praveen
    Replies:
    5
    Views:
    518
    Steven Cheng[MSFT]
    Apr 21, 2005
  5. Mellow Crow
    Replies:
    6
    Views:
    429
    Richard Cornford
    Nov 4, 2005
Loading...

Share This Page