Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi , I bought rocketcake during the new year's sale and I like it so far! I need help with this please : I have buttons placed above an image , and a table below the image; When the user clicks on a button, I want to highlight the content of a table cell , or select it or change the cell color, whichever would be possible in rocketcake I searched about javascript ; so far I have managed, via this function " {document.getElementById} to change the color of the button that is clicked , but not the cell content. The "id" of the button is recognized ( I found the "id" in the html code ) , but the "id" of the table cell isn't apparently... I need to somehow "connect" the button to the cell maybe for this to work , but I don't know how to do that. Thanks for your help ! eric |
||||
|
I'm not sure if that is so easily possible, table cells don't have ids in RocketCake unfortunately (having an id for each cell would clutter the source, I guess). BUT: you can access this using cell and row index. This code would make the background of row 2 cell 3 red: var table = document.getElementById("yourTableID"); Be sure to replace 'yourTableID' with the actual id of your table. |
||||
|
Hello Erik , thanks a lot , your solution WORKS ! I'll try to figure out on my own how to revert a highlighted cell back to standard ( white) background color when I click on another cell so only one cell is "highlighted" at a time. Thanks again ! eric |
|