Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-11-2008, 05:24 PM
flyingpig flyingpig is offline
New Comer (less than 5 posts)
 
Join Date: Jul 2008
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Putting Javascript in seperate .js page rather than in <head>

1) Script Title: AnyLink Drop Down Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

3) Describe problem: How can I put the javascript bit into a separate .js page rather than in the <head> to try and reduce the size of the webpage.
Reply With Quote
  #2  
Old 07-11-2008, 05:28 PM
thetestingsite's Avatar
thetestingsite thetestingsite is offline
The Guy That Moderates
 
Join Date: Sep 2006
Location: St. George, UT
Posts: 2,795
Thanks: 3
Thanked 156 Times in 154 Posts
Default

Just place everything between the <script> tags in a seperate .js file and call the file in the <head> of the document like so:

Code:
<script type="text/javascript" src="anylink.js">

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
Hope this helps.
__________________
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
The Testing Site | Atomic Yeti
Reply With Quote
The Following User Says Thank You to thetestingsite For This Useful Post:
flyingpig (07-11-2008)
  #3  
Old 07-11-2008, 05:39 PM
flyingpig flyingpig is offline
New Comer (less than 5 posts)
 
Join Date: Jul 2008
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Cheers that's helped, sorted it now.
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:35 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.