HighDots Forums  

Stop dreamweaver adding javascript in page?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Stop dreamweaver adding javascript in page? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Stop dreamweaver adding javascript in page? - 12-07-2005 , 10:42 AM






Not in versions earlier than DW8, no.

--
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
==================


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

Quote:
Hi,

I've got some rollovers on my website that use the dreamweaver javascript.
This script is quite bulky within in page so I've now made an external
javascript file that the pages link to.

But everytime I open up one of these pages and make a change the rollover
javascript reappears within the page itself?

Is there a way of switching this off?

hope that made sense

muddy




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

Default Stop dreamweaver adding javascript in page? - 12-07-2005 , 10:42 AM






Hi,

I've got some rollovers on my website that use the dreamweaver javascript.
This script is quite bulky within in page so I've now made an external
javascript file that the pages link to.

But everytime I open up one of these pages and make a change the rollover
javascript reappears within the page itself?

Is there a way of switching this off?

hope that made sense

muddy


Reply With Quote
  #3  
Old   
Massimo Foti
 
Posts: n/a

Default Re: Stop dreamweaver adding javascript in page? - 12-07-2005 , 10:44 AM



Quote:
I've got some rollovers on my website that use the dreamweaver javascript.
This script is quite bulky within in page so I've now made an external
javascript file that the pages link to.

But everytime I open up one of these pages and make a change the rollover
javascript reappears within the page itself?
This isn't supposed to happen (and I never seen it happens) at least since
DW 3.
Could you post an url and let us taking a look at it?

--
----------------------------
Massimo Foti
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------





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

Default Re: Stop dreamweaver adding javascript in page? - 12-07-2005 , 11:20 AM



I think it happened in DMX2004, Massimo....

--
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
==================


"Massimo Foti" <massimo (AT) amila (DOT) ch> wrote

Quote:
I've got some rollovers on my website that use the dreamweaver
javascript.
This script is quite bulky within in page so I've now made an external
javascript file that the pages link to.

But everytime I open up one of these pages and make a change the rollover
javascript reappears within the page itself?

This isn't supposed to happen (and I never seen it happens) at least since
DW 3.
Could you post an url and let us taking a look at it?

--
----------------------------
Massimo Foti
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------






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

Default Re: Stop dreamweaver adding javascript in page? - 12-07-2005 , 11:23 AM



I'm working on a MAC, dont know if that makes a difference. And it happens when
i update the template page (even tho there isnt any javascript in there) - it
updates all the other pages and adds the following script back into the pages
even tho i have a link to it........

So Dreamweaver 8 fixes this?


<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++)
x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length;
i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>


Reply With Quote
  #6  
Old   
Massimo Foti
 
Posts: n/a

Default Re: Stop dreamweaver adding javascript in page? - 12-07-2005 , 11:25 AM



"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote

Quote:
I think it happened in DMX2004, Massimo....
If it happened (and I never seen it), it's a bug

--
----------------------------
Massimo Foti
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------





Reply With Quote
  #7  
Old   
Massimo Foti
 
Posts: n/a

Default Re: Stop dreamweaver adding javascript in page? - 12-07-2005 , 11:27 AM



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

Quote:
I'm working on a MAC, dont know if that makes a difference. And it happens
when
i update the template page (even tho there isnt any javascript in there) -
it
updates all the other pages and adds the following script back into the
pages
even tho i have a link to it........

So Dreamweaver 8 fixes this?
I don't use DW's templates, sorry. I can't help on it.
Murray is the template masters.

--
----------------------------
Massimo Foti
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------





Reply With Quote
  #8  
Old   
Holland87
 
Posts: n/a

Default Re: Stop dreamweaver adding javascript in page? - 12-07-2005 , 12:24 PM



Massimo Foti wrote:
Quote:
If it happened (and I never seen it), it's a bug
It's not a bug. Dreamweaver MX 2004 impliments it automatically. Why?
Convience for novice users.

So, unfortunately "muddy," I believe if you're using MX04, you have no choice
in the matter.



------
Shane H
http://www.deceptivemagic.com



Reply With Quote
  #9  
Old   
Massimo Foti
 
Posts: n/a

Default Re: Stop dreamweaver adding javascript in page? - 12-07-2005 , 12:27 PM



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

Quote:
Massimo Foti wrote:
If it happened (and I never seen it), it's a bug

It's not a bug. Dreamweaver MX 2004 impliments it automatically. Why?
Convience for novice users.
I think we are talking about different things. Assume you have a page, with
a <script> tag pointing to a .js files. The .js file already contains all
the JavaScript code required for DW's "Swap Image" behavior. As soon as you
add another instance of "Swap Image" to that file, DW will not embed any
addittional JavaScript code inside the <head>.

It works this way at least since DW 3, maybe even DW 2.

--
----------------------------
Massimo Foti
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------





Reply With Quote
  #10  
Old   
Holland87
 
Posts: n/a

Default Re: Stop dreamweaver adding javascript in page? - 12-07-2005 , 01:50 PM



Put it this way:

At least with MX2004, it won't add it to the .js file. Also, if you're linking
an external style sheet in MX2004 and create a newly defined style by say the
Property Inspector, MX2004 will put the new style in the current .htm document,
not the .css file that the page is pointing to.


------
Shane H
http://www.deceptivemagic.com


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.