I've searched stackoverflow for an answer to this question, but I couldn't find one (or I didn't understand the answers well enough to know that my question has been answered, so please accept my apologies if the later is the case).
You can see an example of the site that I'm working on at http://www.bcgsc.ca/downloads/bdavis/tempsite/.
What I would like to be able to do is have an onHover or onClick (or ideally both, each resulting in a different action) for the row names. You can see an example of this functionality by looking at the column headers. If you allow your mouse cursor to hover on the column header H3K4me3 (for example) it will bring up a brief description of what that is, and if you click on it it will open up a web page where I will place content in greater depth about it. I would like to be able to recreate this functionality for the rows headers (e.g. CD19+ cell).
At the moment, the website populates the grid by reading a data.xml file which specifies enough information to display the values contained in the grid, and provide the information to the back end of the system so that when a user clicks on 'View in UCSC browser' that the correct information is transmitted. A CDATA tag is used in the data.xml file, a brief example of which is pasted below.
<cell><![CDATA[ Blood]]></cell>
The way I had conceived of achieving this functionality was to place some javascript + html within the CDATA object, but obviously that won't work because it's CDATA, so it's not parsed, but replacing CDATA with PCDATA causes the backend to break (I don't know why) and the table doesn't get filled in at all. I've even tried simply replacing the entire CDATA snippet with just an stuff, but that's not processed by the web browser either, I imagine that's because of the way jqgrid is transmitting the data.
Note, that at the moment when you hover over the row names, you can see the contents of that cell. So a reasonable strategy would for the onHover functionality be to dynamically change the title for that cell, or perhaps modify jqgrid in some way to allow it to set the cell contents to something different from the title attribute.
An ideal solution would allow me to have both .hover functionality and .onClick style functionality, but I would be satisfied if I could only get the onClick to work. That is definitely the more important function. At the moment the cell does not have a unique id, but the row does.
So, can anyone help me or provide some directions to look in.
Thanks, Brad Davis