Overwriting a row in a table

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
TorMike
Forum Newbie
Posts: 17
Joined: Thu Feb 25, 2010 9:14 am

Overwriting a row in a table

Post by TorMike »

My task is, I thought, simple.

My client, as the administrator of a website, would like the ability to send an email blast to all site clients. Easy enough, I just created a PHP function that loop through the client table, selected the email field and call the UNIX mail function. Job done, server side.

Initially, on the website, I displayed the results of the blast by creating a table and displaying a row (withing a <td></td> tags), for each email address. Job done, client side.

But then I was asked if, instead of a new row to display each email address, could I just overwrite the same row with each email address. Whether you could read each address is probably impossible, but the client asked.

So instead of a display that looks like this:

Message sent to: a@mail.com
Message sent to: b@mail.com
etc...

Is there a way to display just one line that keeps overwriting the row using either Javascript or jQuery?

My experience is in MySQL and PHP with enough XHTML/Javascript/jQuery to be dangerous.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Overwriting a row in a table

Post by califdon »

I agree that it's a nonsensical request, but if I had to do it, I would use PHP to build a Javascript array with the data, and write a Javascript function that would read the array elements one at a time, with some pause function that could be adjusted to time the replacement of the data, all within the browser.
TorMike
Forum Newbie
Posts: 17
Joined: Thu Feb 25, 2010 9:14 am

Re: Overwriting a row in a table

Post by TorMike »

This is going to be a lot harder than I expected.

You know, this can't be the first time somebody thought to overwrite a HTML line. I really can't believe that there isn't a function somewhere that would handle this issue. But what do I know.

Thanks for the feedback.
foxmahesh
Forum Newbie
Posts: 5
Joined: Thu Mar 31, 2011 8:34 am

Re: Overwriting a row in a table

Post by foxmahesh »

U S E L E S S & N O N S E N S I C A L R E Q U E S T
Post Reply