Is it possible to get (and manipulate) this value?

L

laredotornado

Hi,

Let's assume for a moment that I have well-formed HTML. I have a
couple of places where I would like to extract the value of the node

<td class="sidebarText" id="title1">My cell title</td>

and

<span class="moduleTitle" id="spanTitle1">Span Title 1</span>

and actually change the value. Is this possible and what is a cross-
browser way in which this can be done?

Thanks, - Dave
 
V

VK

Hi,

Let's assume for a moment that I have well-formed HTML. I have a
couple of places where I would like to extract the value of the node

<td class="sidebarText" id="title1">My cell title</td>

and

<span class="moduleTitle" id="spanTitle1">Span Title 1</span>

and actually change the value. Is this possible and what is a cross-
browser way in which this can be done?

Quick and durty:

<button type="button" onclick="
document.getElementById('spanTitle1').innerHTML = 'Hello world!';
">Change content</button>

Insert onto your page and click.
 
R

Randy Webb

(e-mail address removed) said the following on 2/12/2007 6:12 PM:
Hi,

Let's assume for a moment that I have well-formed HTML. I have a
couple of places where I would like to extract the value of the node

<td class="sidebarText" id="title1">My cell title</td>

and

<span class="moduleTitle" id="spanTitle1">Span Title 1</span>

and actually change the value. Is this possible and what is a cross-
browser way in which this can be done?

Use DynWrite from the group FAQ.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top