HighDots Forums  

javascript external file

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss javascript external file in the Macromedia Dreamweaver forum.



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

Default javascript external file - 07-12-2004 , 11:52 AM






I have read all the articles on linking to the javascript in lieu of taking up
space on each page and tried everything recommended but it still won't work for
me. If someone would be kind enuf to look at my site and advise on what to
change, I would appreciate it. I have moved all the javascript beginning at
"function and ending at </script >" including and excluding the <!-- comments
to an external page, but previewing it doesn't show the submenu list.
http://louisiana-mo.com/arts_murals.htm. Also the
http://louisiana-mo.com/cal_events.htm has a second javascript for the
calendar. Would that be included in the same page or a separate .js page
Using Dreamweaver MX.
Thanks so much.


Reply With Quote
  #2  
Old   
Happy
 
Posts: n/a

Default Re: javascript external file - 07-12-2004 , 12:44 PM






Here's how you do it -

http://www.hypergurl.com/jsfiles.html



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

Quote:
I have read all the articles on linking to the javascript in lieu of
taking up
space on each page and tried everything recommended but it still won't
work for
me. If someone would be kind enuf to look at my site and advise on what
to
change, I would appreciate it. I have moved all the javascript beginning
at
"function and ending at </script >" including and excluding the <!--
comments
to an external page, but previewing it doesn't show the submenu list.
http://louisiana-mo.com/arts_murals.htm. Also the
http://louisiana-mo.com/cal_events.htm has a second javascript for the
calendar. Would that be included in the same page or a separate .js page
Using Dreamweaver MX.
Thanks so much.




Reply With Quote
  #3  
Old   
Gary White
 
Posts: n/a

Default Re: javascript external file - 07-12-2004 , 02:25 PM



On Mon, 12 Jul 2004 15:52:38 +0000 (UTC), "Murrel"
<webforumsuser (AT) macromedia (DOT) com> wrote:

Quote:
I have read all the articles on linking to the javascript in lieu of taking up
space on each page and tried everything recommended but it still won't work for
me. If someone would be kind enuf to look at my site and advise on what to
change, I would appreciate it. I have moved all the javascript beginning at
"function and ending at </script >" including and excluding the <!-- comments
to an external page, but previewing it doesn't show the submenu list.
http://louisiana-mo.com/arts_murals.htm.

You still have about 842 tons of JavaScript in the page referenced above
and the only link to an external JavaScript file is the one to the other
964 tons of JavaScript in the poorly written mm_menu.js file. However,
from your description above, it sounds like you may be doing something
wrong. Consider this JavaScript in a page:

<script type="text/javascript">
<!--
function something(){
code here
}
more code here
//-->
</script>

Copy this code and paste it into an external file, named with a .js file
extension:

function something(){
code here
}
more code here

Note that you do NOT copy the <script> or </script> tags and you do NOT
copy the <!-- or //--> comment delimiters. Next, remove the whole block,
beginning with <script type="text/javascript"> and ending with
</script>. Now, link to the external .js file:

<script type="text/javascript" src="path/to/your.js"></script>


Gary


Reply With Quote
  #4  
Old   
two can's
 
Posts: n/a

Default Re: javascript external file - 07-12-2004 , 04:45 PM



Hi yea,
if your feeling a lite rich try using the productivity extension from
http://www.projectseven.com
it will allow you to make the script into an exterrnal file or from an
extensal file with great ease, alone with that it will also make a simple
process of taking the onload event from the body tag if needed be.


regards

twocan's





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

Quote:
I have read all the articles on linking to the javascript in lieu of
taking up
space on each page and tried everything recommended but it still won't
work for
me. If someone would be kind enuf to look at my site and advise on what
to
change, I would appreciate it. I have moved all the javascript beginning
at
"function and ending at </script >" including and excluding the <!--
comments
to an external page, but previewing it doesn't show the submenu list.
http://louisiana-mo.com/arts_murals.htm. Also the
http://louisiana-mo.com/cal_events.htm has a second javascript for the
calendar. Would that be included in the same page or a separate .js page
Using Dreamweaver MX.
Thanks so much.




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.