• 0

CSS & ColdFusion


Question

Ok I have a DIV that on rollover of an object it changes position to the mouse pointer. However, I also want it to replace the content of the DIV tag with ColdFusion code. Something like this:

<cfoutput><img src="../#staffmember.imageName[3]#" align="middle"><span class="style1">

#staffmember.wName[3]# </span> </cfoutput>

Does anyone know how to do this? Thanks.

(current link code):

<a

onmouseover="ShowContent('magnify'); return true;"

onmouseout="HideContent('magnify'); return true;"

href="java script:ShowContent('magnify')">

IMAGE

</a>

Link to comment
https://www.neowin.net/forum/topic/596229-css-coldfusion/
Share on other sites

2 answers to this question

Recommended Posts

  • 0

That's going to have to be AJAX, I assume. The easier way to do this is to have a separate div for each object and just have each object's div show/hide accordingly. The AJAX way may prove to be too "slow" for something like that being as how you'll want that to be megafast anyway.

Link to comment
https://www.neowin.net/forum/topic/596229-css-coldfusion/#findComment-588943043
Share on other sites

  • 0

ok if I have say seven pictures and I want the content of the DIV tag to change differently with each of the pictures. So I guess the code would be something like this.

Button Code:

<a

onmouseover="ShowContent('magnify'); return true; changeContent(2);"

onmouseout="HideContent('magnify'); return true;"

onClick="HideContent('magnify');"

href="staffmember.cfm?EmployeeID=2"><img src="../staff_pictures/thumb/tn_mckee.jpg" width="43" height="60" border="0"></a>

The Javascript would be:

<cfoutput>

<script language="javascript">

function changeContent(i) {

magnify = document.getElementById('magnify');

magnify.innerHTML = "<img src="../#staffmember.imageName#" align="middle"><span class="normalText">

#staffmember.wName# </span>";

}

</script>

</cfoutput>

The DIV tag would be:

<cfoutput><div id="magnify"><img src="../#staffmember.imageName[2]#" align="middle"><span class="normalText">

#staffmember.wName[2]# </span> </div></cfoutput>

Link to comment
https://www.neowin.net/forum/topic/596229-css-coldfusion/#findComment-588943642
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • One of my PC's is Windows 11 Home Edition... and guess what? it supports Hyper-V Disks and Containers, as well as WSL2... which these desktop tools leverage on an as-needed basis. It does not need to be enabled system-wide; it merely needs to exist. Furthermore, I tried something yesterday with Hermes Desktop and their "installer" actually builds everything from source as part of its installer toolchain! The installer (and updater as it were) both go through a roughly 19-step process to prep the system for the tool to be used -- and connectivity to local/remote models, local/remote agent configs, and other steps are not included as part of this process (those are all user config steps post-install). ALSO, the "bug wasn't confirmed to exist" is the weakest argument against a bug. That's literally every flawed product's knee-jerk reaction! Even politicians, lawmakers, murderers, and other violent criminals start with that defense... "I deny everything I'm accused of." The bug is the (shared) experience. Whether it's truly Claude Code's fault, or user error, or some other software package being the ultimate culprit, is not the point. They are experiencing unpleasant side effects and don't like that.
    • Each generaton has its exciting times and I was fortunate enough to be right there at the beginning of the PC industry.   I don't think any of us at that time realized how large it would become I still remember working on a TRS-80 with a green screen monitor that kept overheating and dying.     Also used some TRS-80 PCs with tape cartridge memory.   They worked but boy were they slow with everything being a very slow sequential read or write.  But heh, they worked though it wasn't long before they were repaced by the HDD. 
    • One Drive should be a four letter word. First thing I disable on my computer. If I want to upload something to the cloud, I use a cloud base storage, NOT microsoft. Oh but what about backup. I have done backups since floppy disk eras...it just comes naturally.
    • It does just not OneCloud. 🤷🏻‍♂️
    • Claude Desktop on Linux doesn’t have ram issues. Strange. 🤷🏻‍♂️
  • Recent Achievements

    • One Month Later
      Sopa flores earned a badge
      One Month Later
    • First Post
      StaticMatrix earned a badge
      First Post
    • Week One Done
      StaticMatrix earned a badge
      Week One Done
    • Rookie
      lamborghiniv10 went up a rank
      Rookie
    • One Month Later
      pinnclepd earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      515
    2. 2
      PsYcHoKiLLa
      208
    3. 3
      +Edouard
      160
    4. 4
      Steven P.
      96
    5. 5
      ATLien_0
      81
  • Tell a friend

    Love Neowin? Tell a friend!