hello
I'd like to change only a few letters in a lengthy text, which is inside a div layer.
Needs to work only on Netscape4
Exemple: here's my div
Let's say I want to change 42 to 24.
I do this
But since it's a long text, I'd like to avoid re-writing the whole of it (plus the html tags) in the div.
I've tried
so the whole of the div content becomes a string, then I would use
but it doesn't work.
PS: I'd like to keep my 'div-table-paragraph' structure unchanged.
Thanks
I'd like to change only a few letters in a lengthy text, which is inside a div layer.
Needs to work only on Netscape4
Exemple: here's my div
Code:
<div id='x' ><table><tr><td><p>The answer is 42, not counting the fish.</p></td></tr></table></div>
Let's say I want to change 42 to 24.
I do this
Code:
function change_txt()
{
var txt = document.layers['x']
txt.document.open()
txt.document.write('<table><tr><td><p>The answer is 24, not counting the fish.</p></td></tr></table>')
txt.document.close()
}
But since it's a long text, I'd like to avoid re-writing the whole of it (plus the html tags) in the div.
I've tried
Code:
toString()
Code:
my_string.replace('42','24')
but it doesn't work.
PS: I'd like to keep my 'div-table-paragraph' structure unchanged.
Thanks