Welcome to WebmasterWorld Guest from 54.157.81.13

Forum Moderators: open

Message Too Old, No Replies

Dreamweaver MX

External JS and auto Inserted JS

     
11:07 am on May 7, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 27, 2002
posts:125
votes: 0


Is there a (hidden?) preference that prevents Dreamweaver inserting JS a .html for rollovers etc. I have all the rollover functionality in an external .js but when I update a template DW insists on duplicating it in the page.

Any help will save my insanity.

11:59 am on May 7, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 21, 2001
posts:2491
votes: 0


Not sure what you mean. Do you mean that the .js is linked from in the template, and when you alter the template, it create's a second link on the page's linking to the template?
12:43 pm on May 7, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 27, 2002
posts:125
votes: 0


I'll try and explain it better. I'm not 100% with DW so excuse if I show a big chunk of ignorance.

I have an external js, which has all the DW rollover functions in it

<SCRIPT LANGUAGE="JavaScript" SRC="rolloverstuff.js"></SCRIPT>

I thought that by putting the rollover stuff in a separate js would helps with download times and SEO.

This link to the js is part of the template in the head. The template structure is

<HTML><!-- #BeginTemplate "/Templates/template.dwt" --><!-- DW6 -->
<HEAD>
<!-- #BeginEditable "doctitle" -->
<title> Whatever title </title>
<!-- #EndEditable -->
<!-- #BeginEditable "metas" -->

<!-- #EndEditable -->
<link rel="stylesheet" href="../cc.css"><SCRIPT LANGUAGE="JavaScript" SRC="../dwrolloverstuff.js"></SCRIPT>
</head>
<body...

Each time I update the template, and if one of the pages I update has a rollover in it, DW inserts

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() blah blah
function MM_preloadImages() blah blah
function MM_findObj(n, d) blah blah
function MM_swapImage() blah blah
//-->
</script>

into the editable
<!-- #BeginEditable "metas" -->

<!-- #EndEditable -->

I appreciate DW is only trying to be help, but I want wondered if I could switch this off, as I only delete it as the functions are in the dwrolloverstuff.js. Is it a bug? Itís very annoying and quite time consuming finding and deleting before publish. (I personally can't stand rollovers, but I won't go there.)

I don't want DW to insert the rollover stuff again because it's already contained in the dwrolloverstuff.js.

Can I prevent DW from inserting the rollover functions each time I update the template?

[edited by: caine at 1:52 pm (utc) on May 7, 2003]
[edit reason] Specific term used, probably an oversight - however against TOS [/edit]

1:56 pm on May 7, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 21, 2001
posts:2491
votes: 0


I think it is a bug. Whether there is a way around it, i am not sure. Will have a look later when i get out of work.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members