Integrating .js files into WCM template

I am trying to integrate a 3rd party web template into WCM template 1600 however I am unable to make the includes to several .js files work properly. I enabled the ability to add javascript to the editor but didn't work. I have even tried to add the files in the master page but no luck.

Original Site URL: http://216.195.124.97/default.aspx

WCM URL: http://216.195.124.96/HRSW/HRSWC/Home/HRSW/Default.aspx

Does anyone have any ideas how I can make this work?

Thanks, Terry

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi Terry, I have sucessfully

Hi Terry,

I have sucessfully added jQuery into a WCM site by adding the relevant includes. The only thing I can think that might be different from what you are doing is that I have added them at the bottom of the page as they were getting muddled up with the ASI js when they were at the top of the page.

In our client's site I have added the following lines just above the closing <body> tags (outside of the ASI form in case that makes a difference):

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="/AsiCommon/Scripts/jQuery_Color.js"></script>
<script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.1.pack.js"></script>
<script type="text/javascript" src="/fancybox/jquery.easing-1.3.pack.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox-1.3.1.css" type="text/css" media="screen" />

It's probably also worth noting that jQuery appears to conflict with the iMIS E-Shop system and it stops it displaying the "What's this?" link images properly, but seeing as that was the exact thing I wanted to replace with jQuery commands, I was in luck! It's very messy but the following code makes a massive improvement to the standard thumbnail images:

	var link_url=$("img#thumbNail").attr("src");
	$("a#ctl00_TemplateBody_ProductDetail1_TitleDescriptionControl_ctl01_InfoButton").unbind("click");
	$("a#ctl00_TemplateBody_ProductDetail1_TitleDescriptionControl_ctl01_InfoButton").attr("href", link_url);
	$("a#ctl00_TemplateBody_ProductDetail1_TitleDescriptionControl_ctl01_InfoButton").addClass("fancybox_image_shop");
	$("a#ctl00_TemplateBody_ProductDetail1_TitleDescriptionControl_ctl01_InfoButton").html("<img src='/images/Icons/magnifying_glass.png' align='absmiddle' style='border: 0px; float: none;'> Enlarge");

Hope some of that helps you anyway. The site is at www.nhf.info if you want to take a look.

 

Regards,

Kieren

Terry Hammond enSYNC

Terry Hammond enSYNC Corporation Fort Worth, TX terry@ensync-corp.com

Thanks Kieren! Are you adding this in the editor or to the actual page/file?

Hi Terry, I added it

Hi Terry,

I added it directly into the master file in the templates folder.

 

Kieren