Google Answers Logo
View Question
 
Q: Need a Javascript to make some dynamic text changes! ( Answered,   0 Comments )
Question  
Subject: Need a Javascript to make some dynamic text changes!
Category: Computers > Programming
Asked by: 350nice-ga
List Price: $20.00
Posted: 24 Apr 2003 19:40 PDT
Expires: 24 May 2003 19:40 PDT
Question ID: 195110
I need a Java Script that does the following:
There will be an HTML table displaying Words. When you click on a word
it will change color (and stay changed) and display a definetion.
There will be 20 words on the page. all the defintions need to be
loaded on start in a JS. The ctahc is all the color changing and
definiton displaying must be done without a refresh. It all has to
happen on the fly. When the user clicks another word. It changes color
and stays changed. Anyone?
Answer  
Subject: Re: Need a Javascript to make some dynamic text changes!
Answered By: dogbite-ga on 24 Apr 2003 21:48 PDT
 
Hello 350nice-ga,

  Okay, I wrote up some JavaScript that allows
  you to:

    1) define a list of words and their definitions
    2) click on any of the words
    3) the clicked word will change color
    4) the definition for that word will appear elsewhere.

  I have tested the script under both Mozilla and IE.

  You can find an example page here:

http://nms.lcs.mit.edu/~gch/google/dictionary/dictionary.html

  Just look in the source code for that file to find
  the JavaScript.  Please let me know how it works for you.

  I hope that helps you!

         dogbite-ga

Clarification of Answer by dogbite-ga on 24 Apr 2003 23:21 PDT
Hey 350nice-ga,

  I just realized that you probably
  meant that you wanted the word to
  stay colored, even when you click
  on a new word.  I have put the code
  for that version here:

http://nms.lcs.mit.edu/~gch/google/dictionary/dictionary2.html

          dogbite-ga
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy