SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rollover button with CFML

    Ok, i am displaying image links for a site however i can't get the rollover images from javascript to work in the cfoutput tag. Here is the code that i am trying to get to work. I figured i should post this thread here b/c someone may see the javascript problem. I'd appreciate any help. It's just loading the image right now and now performing the image_over rollover. Thanks


    <cfquery name="qproducts" datasource="shoreline">
    SELECT *
    FROM category
    ORDER BY category
    </cfquery>

    <cfoutput query="qproducts">
    <SCRIPT LANGUAGE="JavaScript">
    imagea = new Image();
    imagea.src = "#qproducts.image_over#";
    </script>
    </cfoutput>
    <table border="0">

    <cfoutput query="qproducts">
    <cfif #qproducts.currentrow# MOD 3 eq 1 OR #qProducts.currentrow# EQ 1>
    <tr>
    </cfif>

    <td><a href="products_finish.cfm?cat_id=#qProducts.cat_id#">
    <img name="imagea" src="#qproducts.image#" border=0 onmouseover="imagea.src='#qproducts.image_over#';" onmouseout="imagea.src='#qproducts.image#';"></a></a></td>


    <cfif #qproducts.currentrow# MOD 3 eq 0>
    </tr>
    </cfif>

    </cfoutput>
    </table>

  2. #2
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind, i got the code to work..


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •