India Forums .Info

Discuss Cars, Bikes, Jobs, Romance, Marriage, Jobs, Real Estate, Programming and more..
It is currently Wed Dec 03, 2008 3:41 am

All times are UTC + 5:30 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Change multiple span text to the same value
PostPosted: Thu Nov 22, 2007 2:46 pm 
Offline
Newbie

Joined: Thu Nov 22, 2007 2:38 pm
Posts: 3
ere's what I need to do:

I have several variables that I want to assign to various spans within a page (i.e. customer_name, customer_address, etc.). Now, I am going to have more than a 1 span that I dynamically need to assign the customer_name to. But I want it to be able to do so without me having to name them all "customer_name1, customer_name2, customer_name3" and then having to go through and manually change each one, one-by-one within the function.

What I'd like to do is ultimately have the function loop through every span with the name or id of "customer_name" and change the innerHTML within it to whatever the value of the costomer's name variable is ("John Doe" for example).

I've tried a few ways, most of the time it only changes 1 instead of all of them.

Can anyone help? :?

_________________
low interest credit cards Dessous


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 5:30 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO