Jump to content

marz

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

marz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have managed to get the result: <table border="1" > <tr> <td onmouseover="highlight_cell('a1'); highlight_cell('b1')" onmouseout="unhighlight_cell('a1'); unhighlight_cell('b1')" id='a1' > A1 </td> <td onmouseover="highlight_cell('a2'); highlight_cell('b2')" onmouseout="unhighlight_cell('a2'); unhighlight_cell('b2')" id='a2' > A2 </td> <td onmouseover="highlight_cell('a3'); highlight_cell('b3')" onmouseout="unhighlight_cell('a3'); unhighlight_cell('b3')" id='a3' > A3 </td> </tr> </table> <br /> <table border="1" > <tr> <td onmouseover="highlight_cell('a1'); highlight_cell('b1')" onmouseout="unhighlight_cell('a1'); unhighlight_cell('b1')" id='b1' > B1 </td> <td onmouseover="highlight_cell('a2'); highlight_cell('b2')" onmouseout="unhighlight_cell('a2'); unhighlight_cell('b2')" id='b2' > B2 </td> <td onmouseover="highlight_cell('a3'); highlight_cell('b3')" onmouseout="unhighlight_cell('a3'); unhighlight_cell('b3')" id='b3' > B3 </td> </tr> </table> ==================================== Is there a short cut to avoid long <td... lines? I was experimenting withouth sucess on this method : function highlight_cell( cellA,cellB ) { document.getElementById( cellA ).className='special_cell_style'; document.getElementById( cellB ).className='special_cell_style';}
  2. Unfortunately it did not work as expected - I am stuck with 3 yellow cells in A1, A2, A3 (initial_cell_style). B1,B2,B3 do change on hoovering on A1-A3. I try to tweak some things here ... PS: when I used classname instead className, it did not work - is Javescript case sensitive!!
  3. Yes, the purpose was actually Cell A1,A2, A3 in Table A and Cell B1,B2,B3 in table B. To avoid confusion, I have edited the code to stick with that example. - It did not work :'( = it does not even highlght any Cell. What's wrong? is it the style?
  4. Please can you copy/paste part of the code and edit it to examplify your words as did not really undertsand (as I said I do not kow the Java language). Many thanks!
  5. Obviously, I did not learnt how to use your suggested code. In the simple table example above, I want that when the mouse is on A1 or B1, both cells A1 and B1 becomes highlihted. Same for A2-B2 and A3-B3. I do not have any JS skills and did not understood the code (esp cell_101). Would be grateful to you if you can re-edit teh code to learn the technique. Thanks a lot Sergie - we love Russia (not only for the girls!)
  6. Thanks, I will experiment with the code and try (becasue I am no JS coder) to adapt it. In the menatime, a further tip will help me alot: If I want to highlight Cell A and Cell B (and Cell C, D, E ... if I am understanding) I have to include the [ onmouseover="highlight_cell( 'cell_101' )" onmouseout="unhighlight_cell( 'cell_101')" ] thing in Cell A +B and whether the mouse is on Cell A or CEll B, both will highlight - hope that answer is a yes! Then I need to set the 'special_cell_style' and 'initial_cell_style' in my css file right?
  7. I need a smart tip to highlight a Cell in table B when the mouse is hovered over a link (or cell) in table A or perhaps different cells within the same table. The need might come that both cells should be highlighted, that is the 'hoover-upon' cell/link and the unhoovered cell in the other table. The application use a pair of tables (with interelated cells) and when one hovering a cell, I want that the corresponding cell in the other table is also (or alone) highlighted without the mouse being on it More or less I know the onmouseover / on Mouseout technique on the hoovered cell, but how to apply it to a different cell that is not hoovered upon!?!? Mega thanks in advance for your help
  8. PS: $history is passed to the next page by hidden form input and use $_REQUEST to get data PS2: Without the <a href tag, things works well! so it is something to do with > or " but I can't see the problem.
  9. I am trying to achieve something that appears simple but I spent few hours in vain This is part of a page which is involved in passing data by forms or/and URL (eg layout.php?k=1) and the display of the page depends on k. At k=1,(first page) things are ok [Joe - <a href="layout_m.php?k=1&name=Joe&type=genus"> 1 </a>] but on passing to the next page, the output is not as desired part of the variable is escaped out on the browser and breaks the variable content View source gives this: Joe - <a href= - <a href="layout_m.php?k=3&name=Joe&type=genus"> 1 </a> while I want: Joe - <a href="layout_m.php?k=1&name=Joe&type=genus"> 1 </a> - <a href="layout_m.php?k=3&name=Joe&type=genus"\> 3 </a> What I achieve to do is a simple history based on an accumulation of k EG Joe - 1 - 3 - 5 - 6 - 8 Where each number (k) is linked and when pressed each go to the corresponding keypage.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.