473,409 Members | 1,970 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,409 software developers and data experts.

Implement read/unread like in email

Hello Guys i am trying to implemenet something like the read/unread in the email.How can i do so by using jquery , php and mysql. What i want to do in steps:

1- When i click on a row in html table i change the status of the this message in database. 2- And then change the background of this row but also if i logout and relogin the row remains changed. 3- knowing that i am already using css classes for the table rows.

What i have done till now is that i changed the status of this specific messages in database with an update.

Regards.
Nov 17 '09 #1

✓ answered by Atli

Hey.

You would have to have the onclick event of the rows trigger a function that:
  1. Sends an AJAX request to a server-side script that updates the database. This is fairly simple using jQuery. (See the AJAX section of the documentation.)
    The server-side (PHP) part is also pretty basic.
  2. Swaps out the CSS class/styles for said row. Again, jQuery makes this very easy to do. Just use the addClass, removeClass or css functions of the jQuery object.

And, to make it stay "read" once logged out and in, you would have to check the database to see if it has already been read when you first load the list of emails.

1 3871
Atli
5,058 Expert 4TB
Hey.

You would have to have the onclick event of the rows trigger a function that:
  1. Sends an AJAX request to a server-side script that updates the database. This is fairly simple using jQuery. (See the AJAX section of the documentation.)
    The server-side (PHP) part is also pretty basic.
  2. Swaps out the CSS class/styles for said row. Again, jQuery makes this very easy to do. Just use the addClass, removeClass or css functions of the jQuery object.

And, to make it stay "read" once logged out and in, you would have to check the database to see if it has already been read when you first load the list of emails.
Nov 17 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: zee | last post by:
Hello there I would like to create an add-in for outlook which looks at all the new email (unread), if they contain particular text on the subject, then a link gets added to the bottom of the...
2
by: Sandman | last post by:
Just looking for suggestion on how to do this in my Web application. The goal is to keep track of what a user has and hasn't read and present him or her with new material I am currently doing...
51
by: moosdau | last post by:
my code: do { printf("please input the dividend and the divisor.\n"); if(!scanf("%d%d",&dend,&dor)) { temp1=1; fflush(stdin); } else
62
by: Bryan Dickerson | last post by:
Is there a way, with VS 2005 and FX 2.0, to read a given inbox? I need to write a 'monitor' program and my boss is convinced, as is always his first gut reaction, that we need to go buy a...
2
by: a | last post by:
keep a list of read and unread items hi guys i m building an rss reader and i want you suggestions for datastructure for keeping read and unread list for each use i m assuming it will be very...
6
by: Jim S | last post by:
I have a need to read the contents of an html table on a remote web page into a variable. I guess this is called screen scraping but not sure. I'm not sure where to start or what the best...
5
by: DC | last post by:
Hi, I need the functionality to take a workitem from a stack, execute it in a different thread, get the next item, execute it asynchronously too, and so on. But: there should never be more than...
5
by: g18c | last post by:
Hi, im trying to do something and just been caught off guard. I want to implement an interface but only for certain class, but of course when i derive from this base class the derived class also...
6
by: jive | last post by:
I'm using SmtpPop.dll to read emails the code: POP3Client pop = new SmtPop.POP3Client(); pop.Open ("pop.gmail.com", 25, "myaccname", "mypass"); SmtPop.POPMessageId messages = pop.GetMailList();...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.