I have built a messaging system where users of a website can send
messages to each other and they will appear in the other users inbox
for viewing next time they log in. In a bar at the top of the page it
says "Inbox (0)" if they have no new messages and, yup, you guessed it
"Inbox (2)" if they have two waiting messages. If someone sends them
a message while they are sitting on some page of the website I would
like the counter to increase. Right now the mysql query runs each
time a page is loaded so they would be notified then but I would like
it to somehow update the inbox number while they sit on a page. Does
anyone have any ideas? Thank you in advance for your help! 2 1618
On May 7, 8:33 pm, Justin Voelker <justin.voel... @gmail.comwrote :
I have built a messaging system where users of a website can send
messages to each other and they will appear in the other users inbox
for viewing next time they log in. In a bar at the top of the page it
says "Inbox (0)" if they have no new messages and, yup, you guessed it
"Inbox (2)" if they have two waiting messages. If someone sends them
a message while they are sitting on some page of the website I would
like the counter to increase. Right now the mysql query runs each
time a page is loaded so they would be notified then but I would like
it to somehow update the inbox number while they sit on a page. Does
anyone have any ideas? Thank you in advance for your help!
I forgot to mention that each time someone sends a message it creates
a new record in a single table in the database. What I am looking for
is a way to monitor that database and find any records with "msg_to"
equal to the user id of the person logged in and "msg_unread " equal to
'1.'
Justin Voelker wrote:
I have built a messaging system where users of a website can send
messages to each other and they will appear in the other users inbox
for viewing next time they log in. In a bar at the top of the page it
says "Inbox (0)" if they have no new messages and, yup, you guessed it
"Inbox (2)" if they have two waiting messages. If someone sends them
a message while they are sitting on some page of the website I would
like the counter to increase. Right now the mysql query runs each
time a page is loaded so they would be notified then but I would like
it to somehow update the inbox number while they sit on a page. Does
anyone have any ideas? Thank you in advance for your help!
You aren't going to be able to do this unless they refresh the screen.
The browser knows nothing about changes on the server.
AJAX can help. Try comp.lang.javas cript.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== === This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Aaron W. West |
last post by:
Timings... sometimes there are almost too many ways to do the same thing.
The only significant findings I see from all the below timings is:
1) Integer math is generally fastest, naturally. Bigint math isn't much
slower, for integers that all fit within an integer.
2) Converting float to varchar is relatively slow, and should be avoided if
possible. Converting from integer to varchar or varchar to int is several
times faster.
|
by: cwdjr |
last post by:
Real One has a page to copy on their site that detects if the browser
of a viewer of a page has Real One installed. The page is located at...
|
by: Paul |
last post by:
In real life situation, do we ever come across a situation where we
would need two base objects in an object.
A snippet is worth 1000 words (: so...
class Base
{
};
class Derived1:public Base
{
};
|
by: mo |
last post by:
Hi
We've got some numbers stored as Reals which are returning values in
scientific notation that we need rounded down to 3 digits to the right
of the decimal.
ie 8.7499999E-2 needs to return 8.75.
Round, cast, convert, formatnumber in the dts package all fail.
Help!
Thanks Moe
|
by: Allan Adler |
last post by:
I'm trying to reinstall RedHat 7.1 Linux on a PC that was disabled when
I tried to upgrade from RH7.1 to RH9. This is presenting lots of unexpected
difficulties. Apart from wanting to keep the old model T in shape, I'm treating
this as a learning experience. Right now, I'm trying to gain more control
over the installation CD. By that I mean, I intend to modify the installation
script and other aspects of the CD and burn a new installation...
| |
by: Pavils Jurjans |
last post by:
Hallo,
It is know issue that due to the fact that computer has to store the real
numbers in limited set of bytes, thus causing a minor imprecision from the
decimal value that likely was stored. I don't know, how dotnet framework
stored doubles, but it's certain, that if I store, say, 1.234567 in some
real variable, it is stored in memory like something close to
1.2345670000000000000003454786544 or...
|
by: David Scemama |
last post by:
Hi,
I'm writing a program using VB.NET that needs to communicate with a DOS
Pascal program than cannot be modified. The communication channel is through
some file databases, and I have a huge problem writing VB Double values to
the file so as the Pascal program can read them as Pascal Real values.
I've managed to find the algorithm to read the Pascal Real format and
convert it to a VB Double, but I cannot figure out the opposite...
|
by: support |
last post by:
Veteran Real Estate Investor Shares some of
his best Insider Secrets for successful investments!
www.RealEstateBeginners.ws
Have you ever wondered about investing in real
estate? Maybe one sleepless night you tuned
in to one of those infomercials that promises
you the moon.
You know the ones we're talking about. They
|
by: DirtyHarry |
last post by:
Good day everyone. This sounds like a stupid question, but I became
just curious yesterday, and I looked up several textbooks. However, no
textbooks on computer language (that I have ) mentioned this. So I am
asking to you, gurus...
Is there any particular reason to call 'float' instead of 'real'?
|
by: Tim |
last post by:
Folks,
Can anyone thow some clarifying light on the following?
I have come across a column with the same name and same data contents
defined on different tables, on some the column is defined as a FLOAT
on others it is a REAL.
(Don't ask me why, it's inherited, legacy and due for removal once we
have absorbed all the good bits into the data warehouse). .
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |