• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Creating Interactivity with B... > Moving the JavaScript Functions to a...

Moving the JavaScript Functions to an External Script

When creating an online learning application, Dreamweaver uses JavaScript to accomplish much of the interactivity. It’s best to store all the JavaScript for your site in a single location. This enables you to update the JavaScript in a single place and saves download time by not requiring the learner to continually download the same JavaScript code contained in multiple pages. You’ll gather the JavaScript that Dreamweaver produces and put it in a .js script file.

Dreamweaver adds JavaScript functions, a group of code statements that perform a task such as swapping an image or playing a Flash movie, to the <head> tag of your Web page. You usually end up using the same behaviors repeatedly, so it makes sense to collect these functions and save them in an external JavaScript file.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint