HighDots Forums  

.js sheet

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss .js sheet in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nomayo
 
Posts: n/a

Default .js sheet - 11-10-2004 , 08:23 PM






I'm trying to attach some java code on my site to a seperate .js sheet. I'm
having some troble getting the script to work once it is moved. Does anybody
have any advice on how to do this or can point me in the direction of a good
tutorial.

Thanks


Reply With Quote
  #2  
Old   
David Young
 
Posts: n/a

Default Re: .js sheet - 11-10-2004 , 08:34 PM






Do you have a link you can post?
To link to an external js file, you would need:

<script type="text/javascript" src="/js/file.js"></script>

--
David Young
Senior Web Designer
CFWebmasters.com
david (AT) cfwebmasters (DOT) com
"nomayo" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I'm trying to attach some java code on my site to a seperate .js sheet.
I'm
having some troble getting the script to work once it is moved. Does
anybody
have any advice on how to do this or can point me in the direction of a
good
tutorial.

Thanks




Reply With Quote
  #3  
Old   
nomayo
 
Posts: n/a

Default Re: .js sheet - 11-10-2004 , 10:15 PM



http://www.ejfloridavillarentals.com

Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: .js sheet - 11-11-2004 , 07:44 AM



It's javascript, not Java - the two are quite different.

Copy everything between this -

<script language="JavaScript" type="text/JavaScript">
<!--

and this -

//-->
</script>

(NOT INCLUDING THOSE TAGS)

and paste it into a plain text file so that the first line of the file is
this -

function MM_preloadImages() { //v3.0

and the last 2 lines are this -

if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}


and save that as your external.js file.

Then delete everything INCLUDING THOSE TAGS from the page and replace it
with a link to external.js as mentioned by David.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"nomayo" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
http://www.ejfloridavillarentals.com



Reply With Quote
  #5  
Old   
nomayo
 
Posts: n/a

Default Re: .js sheet - 11-11-2004 , 01:38 PM



Thank you so much for your help.

Reply With Quote
  #6  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: .js sheet - 11-11-2004 , 01:46 PM



You're welcome. I assume that worked for you?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"nomayo" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thank you so much for your help.



Reply With Quote
Reply




Thread Tools
Display Modes

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

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



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