PDA

Click to See Complete Forum and Search --> : change the text displayed in a table


drglass
06-06-2006, 05:28 PM
how hard can this be!! I can't find anything even remotly about it.

All I want to do is have links on an html page that will change the text in a table on the same page. Preferably taking the text from .txt files. Any one know how to do this? Javascript maybe?

JPnyc
06-06-2006, 06:09 PM
If you want it taken from txt files on the server, then it requires serverside scripting. If you want to code the alternate text into the page, then javascript can do it.

jlknauff
06-06-2006, 08:55 PM
Clarify your question and someone may be able to help ;)

drglass
06-06-2006, 10:17 PM
ok, I want to have text displayed in a box (<table><tr><td>text text text</td></tr><table>). I then want a link on the page that users can click that will change the text in that box.

display1= text1 ---> click link ---> display 1 = text2

at the very least could someone tell me what something like this would be called? I've serched SO much and can't find anything :( Javascript would be best, but anything would help

chris_bcn
06-06-2006, 10:26 PM
any good for you?

http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

JPnyc
06-06-2006, 10:33 PM
It could be a very simple JS function, depending on how large a block of text it is. AJAX might be overkill in that event.

drglass
06-06-2006, 11:25 PM
yeah, just a small body of text. I just don't know enough JS to write anything myself, I need something to work from, something to pick apart. What type of JS function would do this?

edit, I let me see what I can do with the above link. Thats exactly what I'm trying to do (just on a smaller scale, though, it would be of use in other projects)

JPnyc
06-06-2006, 11:45 PM
You could google text replace scripts or better still text replace javascripts

drglass
06-07-2006, 12:53 AM
well I got the ajax working (http://housepeople.docglass.net/htmlhome.htm), I may stick with it, so I can add pictures to the news. Thanks for the help guys

Falyn
06-07-2006, 01:48 PM
wow...Nice Portfolio work!!!

drglass
06-07-2006, 07:06 PM
thanks :)