changing href text

by "Hilma" <Hilma(at)hilma.freeserve.co.uk>

 Date:  Thu, 11 Apr 2002 14:58:59 +0100
 To:  <hwg-techniques(at)hwg.org>
 References:  attbi
  todo: View Thread, Original
HI -
hope someone can help, even though i can;t describe my problem very well :-(

Please can you look at
http://mysite.freeserve.com/bbm/MilesStone/MSProducts.htm

In IE6 and wait for the tables to disappear :-(
(I know I have a browser-compatibility problem, and a performance problem;
also image problems (logo and contact map are scanned-versions!) and a few
others)

- but my *current* problem is:

The Expand / FoldUp buttons are in fact toggles;

The first table has code
----------------------------------------------------------------------------
---------------
<tr><th class="ProductHead" colspan="2"> ROCKERY STONE  </th>

     <td class="FoldButton">
       <a href="javascript:ToggleFold('Rockery', 4)">Expand</a>
       <a href="javascript:ToggleFold('Rockery', 4)">FoldUp</a>
     </td></tr>

  <-- then all the detail rows-->
----------------------------------------------------------------------------
---------------
And the other tables have code:
----------------------------------------------------------------------------
---------------
<tr><th class="ProductHead" colspan="2">
     CHIPPINGS FOR PATHS AND DRIVES
   </th>
   <td class="FoldButton">
       <a href="javascript:ToggleFold('Chippings', 7)">Expand</a>
   </td></tr>
   <-- then all the detail rows-->
----------------------------------------------------------------------------
---------------

Things  work ok; except i really want to change the text whenever I toggle;
(rather than 2 buttons that do the same thing but with different words).
I used to have 4 gif images - "Expand" mouseover, "Expand" normal, "Foldup"
MouseOver and "Foldup" normal;
but i prefer this method;
*but* i cannot work out how to change the displayed text from "Expand" to
"FoldUp".

*If* it can be done - But i'm sure it can, i'm just so close .....

Any ideas, much appreciated :-)

hilma
--x----

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA