close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Template help - Should be easy fix

Thread began 9/22/2009 1:17 pm by dlcjonathan389671 | Last modified 9/23/2009 3:01 pm by Eric Mittman | 1007 views | 2 replies |

dlcjonathan389671

Template help - Should be easy fix

When i post this javascript in my dreamweaver template when i go to update it it delates the script and replaces it with the bottom part. If i don't post the scrip its fine but image rollovers wont work.


<script type="text/javascript">
<!--
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[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>



Replace the above script with below text




<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --></head><!-- InstanceEnd --></html>
&lt;!--
//--&gt;
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Untitled-3.dwt" codeOutsideHTMLIsLocked="false" --><head><!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->

Sign in to reply to this post

dlcjonathan389671

this is the whole head section of the template if it helps

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<link href="../main_new_layout.css" rel="stylesheet" type="text/css">
<link href="../main_content_colum.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
<!--
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[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='plugins/" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10238859-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<style type="text/css">
<!--
.style2 { text-align: center;
color: #AFAFAF;
line-height: 18px;
}
.style4 { color: #FFA73F;
}
.style5 { color: #BFE90A;
}
body {
background-image: url(../backgroundbrownn.jpg);
}
-->
</style>
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>

Sign in to reply to this post

Eric Mittman

It looks as though your code is being encoded with the html entities. It looks like you also have the code in the script tag inside of an html comment. You should try removing the comment from the code so it is more like this:

<script type="text/javascript">
function MM_swapImage() {
// the rest of the code in here
</script>

If you continue to have problems with this post back with the exact steps you are taking that get you this result, there may be a problem with the way it is being added in.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...