sorry, 'messaging system' wasn't a good way to explain what i am trying to do. its a system that automates a process between two departments in my company. one department will submit a request and another department (accounting) will have to review and aprove/deny the request. what I'm developing is a web based system to automate this process. what I need to the ajax to do is when a request is submitted a notification will update on the accounting department side that displays the number of new requests or something like that. its more of a notification system to let one department know that there is a request that needs their attention. i'm guessing it will be very similar to the digg.com/spy where the page is updated with stories that are 'dugg' as they are dugg in real time.
i hope that explaination makes sense. thanks
I'd be more than willing to help you on this subject. Fire away with the
The XMLHTTP object will "post" the data to the url and then the php script
at that URL will return the result back to the same "client" that requested
it. The XMLHTTP object will have the results in it's responseText or
What I suggest doing, depending on what data you need to send back, is
to write your php script to send the data back in XML format, thereby, you
can assign the XML from the XMLHTTP.responseText to the XML property
the XMLHTTP object before in an application to access Hotmail WebDAV
using Delphi. The techniques would be the same, however. I also know
PHP so showing you example code in PHP would be no problem.
I actually got t working using the HTML_AJAX PEAR library. but I don't really understand the xmlhttp object as well as I would like to. I want to get comfortable with it so that I don't need to rely on a library to use the xmlhttp object.
What I needed it for was a really simple system that polls the mysql db and when a transaction has been inserted that needs the attention of that particular user, it displays a notification and some simple info about the transaction. HTML_AJAX worked really well for this and made the process pretty simple. But I feel like I cheated because I still don't understand it well enough to code it myself from scratch.
none of my current projects require anything specifically that would require AJAX. But I want to get comfortable enough with AJAX so that I can start building all of my future apps more and more web 2.0-ish.
any suggestions for that would be very welcome. I'm willing to try whatever to get comfortable with this.
I'd be more than happy to take a look at your code and give you some
end without having to resort to a library like PEAR.
Are you polling on a timer in your main page? If not, how do you receive
notifications that something has been added? How are you deteriming
that data in the table has changed?