1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Rep Power

    Customizing onload tag for single fuseaction

    Greetings list members,
    I am in the process of implementing the zebra tables script documented on A List Apart - http://www.alistapart.com/articles/zebratables/ - and I find I have a problem when trying to implement the onload handler. My app is written in fusebox 3 and I only wish to insert the onload event into the body tag when the results page is viewed (fuseaction=home.results). Any ideas on how to achieve this in the most efficient manner? This can probably be done somewhere in the fbx_Settings file, but I am at a loss as to how. My template currently does something similar in setting an id for each page (used to alter the navigation to show current location), like so....

    I have the following in the main cfswitch file:

    <cfcase value="results">
    <cfset bodyID = "standings">
    <cfset AddToQ("home.defaultLayout AS LAYOUT")>
    <cfinclude template="dsp_results.cfm">

    and in the body tag of my defaultLayout.cfm template - <body id=<cfoutput>"#bodyID#"</cfoutput> >

    Effectively, when the results page is viewed, I want to insert onload = "stripe('playlist', '#fff', '#edf3fe');" into the body tag of this template. I know I could simply choose to use another template for this fuse, but am wondering if it's really necessary.

    All help greatly appreciated
  2. #2
  3. No Profile Picture

    Join Date
    Jun 2002
    Raleigh, NC
    Rep Power
    First off, if you are calling addToQ(), then you are using FuseQ, not Fusebox 3. I just wanted to make sure you and everyone else were aware of this...FuseQ is not FB3. The ideas in FuseQ have been incorporated into Fusebox 4.

    Anyway, can't you just do this?

    <cfif attributes.fuseaction eq "home.results">
    <body onload="stripe('playlist', '#fff', '#edf3fe');">
    <body id="#bodyID#">

IMN logo majestic logo threadwatch logo seochat tools logo