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. Advertisements

  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. Advertisements

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:
    363
    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:
    400
    Steve C. Orr [MVP, MCSD]
    Dec 1, 2003
  3. Plutian

    Application on demand

    Plutian, Aug 30, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    520
    Ben Lovell
    Aug 30, 2004
  4. Jerry

    How to restart Web App On Demand

    Jerry, Dec 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    401
    Gerry O'Brien [MVP]
    Dec 28, 2004
  5. Jignesh Desai

    Tip::Paging on Demand.....

    Jignesh Desai, Mar 10, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    484
  6. Praveen
    Replies:
    5
    Views:
    681
    Steven Cheng[MSFT]
    Apr 21, 2005
  7. Mellow Crow
    Replies:
    6
    Views:
    709
    Richard Cornford
    Nov 4, 2005
  8. Replies:
    17
    Views:
    341
    Rustom Mody
    May 22, 2014
Loading...