Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing text when a link is clicked

Status
Not open for further replies.

jamor1999

Technical User
Jun 26, 2001
182
US
I found dhtml code that will change text that I have displayed in <div> tags when I link is clicked, but it isn't working on Netscape! I've been looking for something cross-browser that will do something that would help me display different text when clicking on a link, but I can't find anything! Anyone have any ideas?

Jane
 
If you're looking for something to work in NS 4.7, I'd forget about it. Not much of anything works in that. For NS 6.x I'd check the NS website. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
In NS4.7x u need to use layers and stuff, and that is much to complicated. However they thrown out layers in NS6.
And because IE6 is not compatible with Java or NS Plugins, try building it for NS6, I hope it will be the standard browser again ;-) mcvdmvs
-- &quot;It never hurts to help&quot; -- Eek the Cat
 
hie
jamor1999, is it what u're lookin for?
<span id=daOne style=&quot;position:absolute&quot;></span>-relative if u want 2 put it into the table

ie4x:
if (document.all)
document.all.daOne.innerHTML='new content'
ie5x, nn6:
if (document.getElementById) document.getElementById(&quot;daOne&quot;).innerHTML='new content'

or use DOM
textnode = document.createTextNode(&quot;some text&quot;);
document.getElementById(&quot;span1&quot;).appendChild(textnode);


nn4x:
if(document.layers){
with (document.layers.daOne.document){
open()
write('new content')
close()
}
}

Victor
 
Thanks people. And I'm gonna try that code Victor.
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top