473,388 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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

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

Feb 12 '07 #1
2 1688
VK
On Feb 13, 2:12 am, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
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.
Feb 13 '07 #2
la***********@zipmail.com 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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Robert Brown | last post by:
suppose I have the following table: CREATE TABLE (int level, color varchar, length int, width int, height int) It has the following rows 1, "RED", 8, 10, 12 2, NULL, NULL, NULL, 20...
3
by: john woo | last post by:
Hi if sel represents a select object, then var length = sel.length; var aValue = sel.option; var aIndex = sel.selectedIndex; I'm wondering what's idea to manipulate this sel, like
15
by: Larry Asher | last post by:
Hi all. I'm a bit of a novice in this arena so please forgive if this question reflects that. I am trying to grab the html from a website and display it within another webpage (once I get this to...
2
by: Jeff | last post by:
Can I manipulate the properties of pure HTML controls (i.e. not server side controls) from my aspx.cs Page_Load event? If so, I don't see the control listed by intellisense. I gave the control a...
2
by: natzol | last post by:
Just a question to verify - I am a beginner in .Net Our business needs require that we have to modify db tables on regular basis (add column, remove column, add/drop table etc). Therefore it is...
69
by: fieldfallow | last post by:
Hello all, Before stating my question, I should mention that I'm fairly new to C. Now, I attempted a small demo that prints out the values of C's numeric types, both uninitialised and after...
1
by: tom | last post by:
Hi, I am a newbie and have a simple question? I have a aspx file and on the form I have a user control which is my header and has some images. Now for various pages I need to load different...
2
by: Tomás | last post by:
Up until lately I've been writing all mad kinds of code for accomplishing things, but lately I've decided to lean more toward the whole readability, etc. side of things. I have a command line...
5
by: raghavendrap | last post by:
$tmp = 0xc0211082; $tmp1 = 0xc0000082; Hello friends, I got doubt when i am converting negative hexadecimal to a decimal number.Please look at mentioned example below. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.