dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Help running external files on a JavaScript/html page

Hybrid View

  1. #1
    Join Date
    Sep 2013
    Posts
    5

    Question Help running external files on a JavaScript/html page

    I am making an html application using mostly JavaScript but am running into difficulties starting up the next file. If there is a way to start up another JavaScript file using JavaScript please tell me! I am also a beginner and could use some Detailed explaining if possible.

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,687

  3. #3
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,739
    You can use AJAX to load a script and then have it run by using eval() to act on the response.

    Before anyone jumps on the eval is evil bandwagon, it does not create any overhead or pose a security risk nor any slower than any other script method.
    STOP using $ prefix on JavaScript variable names...
    Please remember to wrap any code you have in forum tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  4. #4
    Join Date
    Sep 2013
    Posts
    5
    could you elaborate on how to use AJAX. Some examples would be nice.

  5. #5
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,284
    There is no need of Ajax (especially for use eval which is evil). See this page to Dynamically loading an external JavaScript or CSS file.
    Last edited by 007Julien; 10-05-2013 at 06:05 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles