[thelist] ColdFusion and Javascript

Ewing, Christopher cewing at mooremedical.com
Tue Oct 9 10:21:56 CDT 2001


I'm trying to add a javascript menu system to a cold fusion site.  When I
view the page containing the links and javascript by itself, it works fine.

If I include the files inside another page, they stop working.  As a test, I
stripped all content out of the "outer" page, so it only contained HEAD,
TITLE, and BODY tags.  The include still doesn't work.

My outer page, menu page, and scripts are all in the same directory.

It appears to be an issue with CF.  We're using CF5 server.

This is the code for the menu (or included) page

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--

if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;

//-->
</SCRIPT>

<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
<!--

HM_PG_MenuWidth = 170;
HM_PG_FontFamily = "Verdana,Arial,sans-serif";
HM_PG_FontSize = 8;
HM_PG_FontBold = 0;
HM_PG_FontItalic = 0;
HM_PG_FontColor = "white";
HM_PG_FontColorOver = "#63639C";
HM_PG_BGColor = "#63639C";
HM_PG_BGColorOver = "#CECEFF";
HM_PG_ItemPadding = 3;

HM_PG_BorderWidth = 1;
HM_PG_BorderColor = "#DEDEDE";
HM_PG_BorderStyle = "solid";
HM_PG_SeparatorSize = 1;
HM_PG_SeparatorColor = "#DEDEDE";
HM_PG_ImageSrc = "tri.gif";
HM_PG_ImageSrcLeft = "triL.gif";

HM_PG_ImageSize = 5;
HM_PG_ImageHorizSpace = 0;
HM_PG_ImageVertSpace = 2;

HM_PG_KeepHilite = true; 
HM_PG_ClickStart = 0;
HM_PG_ClickKill = false;
HM_PG_ChildOverlap = 20;
HM_PG_ChildOffset = 5;
HM_PG_ChildPerCentOver = 1;
HM_PG_TopSecondsVisible = 2;
HM_PG_StatusDisplayBuild =0;
HM_PG_StatusDisplayLink = 0;
HM_PG_UponDisplay = null;
HM_PG_UponHide = null;
HM_PG_RightToLeft = false;
HG_PG_MenuTop=32;

//HM_PG_CreateTopOnly = 1;
HM_PG_ShowLinkCursor = 1;

//HM_a_TreesToBuild = [3];

//-->
</SCRIPT>

<cfoutput>
<A HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=Bandages&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu10',event)" onMouseOut="popDown('HM_Menu10')"
onClick="return false"><img 
src="/images/category-bandages.gif" height="22" width="67" border="0"
alt="Bandages"></A><A
HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=Diagnostics&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu20',event)" onMouseOut="popDown('HM_Menu20')"
onClick="return false"><img 
src="/images/category-diagnostics.gif" width="75" height="22" border="0"
alt="Diagnostics"></A><A
HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=Emergency&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu30',event)" onMouseOut="popDown('HM_Menu30')"
onClick="return false"><img 
src="/images/category-emergency.gif" width="70" height="22" border="0"
alt="Emergency"></A><A
HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=ExamRoom&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu40',event)" onMouseOut="popDown('HM_Menu3=40')"
onClick="return false"><img src="/images/category-examroom.gif" width="73" 
height="22" border="0" alt="Exam"></A><A
HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=Gloves&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu50',event)" onMouseOut="popDown('HM_Menu3=40')"
onClick="return false"><img 
src="/images/category-gloves.gif" width="51" height="22" border="0"
alt="Gloves"></A><A
HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=InfectionControl&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu60',event)" onMouseOut="popDown('HM_Menu3=40')"
onClick="return false"><img 
src="/images/category-infection_control.gif" width="105" height="22"
border="0" alt="Infection Control"></A><A
HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=LongTermCare&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu70',event)" onMouseOut="popDown('HM_Menu3=40')"
onClick="return false"><img 
src="/images/category-long_term_care.gif" width="93" height="22" border="0"
alt="Long-Term Care"></A><A
HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=Orthopaedic&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu80',event)" onMouseOut="popDown('HM_Menu3=40')"
onClick="return false"><img src="/images/category-orthopaedic.gif"
width="76" height="22" border="0" alt="Orthpaedic/X-Ray"></A><A
HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=Pharmaceutical&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu90',event)" onMouseOut="popDown('HM_Menu3=40')"
onClick="return false"><img src="/images/category-pharmaceutical.gif"
width="94" height="22" border="0" alt="Pharmaceuticals"></A><A
HREF="/index.cfm?PG=Gen&FN=PCAT&PCAT=Surgical&CS=#URL.CS#"
onMouseOver="popUp('HM_Menu95',event)" onMouseOut="popDown('HM_Menu3=40')"
onClick="return false"><img src="/images/category-surgical.gif" width="62"
height="22" border="0" alt="Surgical"></A>
</cfoutput>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="HM_Loader.js"
TYPE='text/javascript'></SCRIPT>

HM_loader.js is located in the same directory.




More information about the thelist mailing list