Well I couldn't get the page loaded (it's our network) but right off the top of my head the < body > tag supports the onLoad and onUnload event handlers and (I could be wrong) but you are trying to re-define that function and that might be the problem. Change the name of the function to something else.
-----Original Message----- From: Tangorre, Michael T. [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 11:35 AM To: CF-Talk Subject: CF / JS Issue Hello all. I am having a problem getting this menu stuff to work in JS. The link below will show you the page with the error. http://149.84.162.227/xfuze/display/test4.cfm The actual CF code is below... The source form the link above will show you the output from this chunk of code. <SCRIPT LANGUAGE="JavaScript1.2" SRC="menu.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript1.2"> <!-- function onLoad() { <cfoutput>window.#Trim(getMainCats.CategoryTitle)# = new Menu();</cfoutput> <cfoutput query="getMainCats" group="CategoryID"> <cfset tempVar = #Trim(getMainCats.CategoryTitle)#> <cfquery datasource="xfuze" name="getSubCats"> SELECT CategoryID, LnkCategoryID, CategoryTitle FROM tbl_categories WHERE LnkCategoryID = #getMainCats.CategoryID# </cfquery> var #Trim(getMainCats.CategoryTitle)# = new Menu(); <cfloop query="getSubCats"> #Trim(tempVar)#.addMenuItem("#getSubCats.CategoryTitle#"); </cfloop> #Trim(getMainCats.CategoryTitle)#.writeMenus(); </cfoutput> } //--> </SCRIPT> I am using the js file from developer.netscape.com Anyone know why this wont work right? Thanks, Mike ______________________________________________________________________ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

