
-----------------------------------
turing91
Thu Feb 07, 2008 4:48 pm

dynamic text
-----------------------------------
Well, I think that's what it would be considered. Anyways, I have a simple project where I'm making a website that has a drop down menu with a list of items. I also have a table which will define the items. What i want to know is how to change the text in one of the table boxes when a new item in the drop down menu is selected.

This is the code i have so far...




My Definitions






var define= new array()
define["Unicode"] = "unicoded"
define["Hexadecimal"] = "hex"
define["Binary"] = "bin"
define["Compiler"] = "compil"
define["Interpreter"] = "inter"
define["Topology"] = "top"
define["Server"] = "ser"
define["Overflow Error"] = "of"
define["Phishing"] = "phish"
define["Network"] = "net"

function definition(def)
{

}


Select a definition from the list:

  Unicode
  Hexadecimal
  Binary




Definition:
Picture:
two
one





any help would be greatly appreciated.

-----------------------------------
OneOffDriveByPoster
Thu Feb 07, 2008 6:41 pm

Re: dynamic text
-----------------------------------
Wrong place to post...

Anyhow




My Definitions







var define;
var selList;
var tdDef;

function init()
{
  selList = document.getElementById("list");
  tdDef = document.getElementById("def");
  define = new Object;
  define

Have fun:
http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/ecma-script-binding.html

Edited by OneOffDriveByPoster:  fixed bug (code was IE-specific by accident)

-----------------------------------
turing91
Sun Feb 10, 2008 1:23 am

Re: dynamic text
-----------------------------------
thanks a lot! +karma for you!

edit: sorry I checked the tutorials for help first and i guess i forgot to go to the help section.
