Results 1 to 9 of 9
Apr 29, 2002, 05:55 #1
reducing innerHTML > function set
In my current folio site I have used IDed spans with the innerHTML command to alter descriptions of folio items.
I have 3 text strings that are all changed: Title, Dimensions and Description.
The spans are called worktitle, dimensions and about, respectively.
Each button in the section sub-menu has the following set of commands (with varying texts):
onclick="worktitle.innerHTML='title blah blah'; dimensions.innerHTML='dimensions blah blah'; about.innerHTML='description blah blah';"
I would like to be able to use functions instead and turn the set into something like:
onclick="textOne('title blah blah'); textTwo('dimensions blah blah'); textThree('new description blah blah.');"
...or ideally, turn the set into one function that can refer to and change all three texts. Something like:
onclick="textWrite('title blah blah', 'dimensions blah blah', 'description blah blah')"
Anyone here want to to show me how it's done?
Thanks in advance