anushka Posted March 27, 2008 Share Posted March 27, 2008 I am mataining the finance company,where i give guides to the the Shares holders,when to sell and when to buy.i cant keep on calling them.I have the records Of all my customer And all are regisetered under different Website like hotmail,gmail. when i send message it should go to all customers like message not a mail.i am thinking to give a pop up window .Like You got a new Message.suppose if they are not loginin at that time i send the message .then i am thinking to display the message when he login Is it possible to do Please tell me how to proceed..I m confident that we can do Quote Link to comment Share on other sites More sharing options...
XoSilenceoX Posted March 27, 2008 Share Posted March 27, 2008 Well you have to use 1 solution, however 2 implementations 1 contains AJAX the other can be done without. Example adding window.document.setInterval('ajaxFunction()',120000); will execute the ajax command on a loop every 2 mintues. Now what you would have to do is create a php command that allowed for you check to see if the message has been viewed by the logged in user. Ill leave that part up to you as this is a backend script unique to your programming style. NOWEVER YOU MUST HAVE A JAVASCRIPT FUNCTION AT THE BOTTOM OF THE SCRIPT IF THERE ARE MESSAGES UNREAD. TO SHOW THE DIV. SIMPLY USE A ABSOLUTE DIV PLACED AT THE CENTER OF THE PAGE AND ABOUT 100PX FROM THE TOP. EXAMPLE: <div id="VirtualMessage" style="position: absolute; top: 100px; left: 50%; margin-left: {ENTER 1/2 OF DIV LENGTH HERE}px; display:none;" ></div> Your ajax command calling the backend file will populate the information within the div of course. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Since it you have the interval auto running it will automatically start checking on login. What I would do is add a timeout so that you instantly check because the 1st check wont start for 2 minutes. so enter this at the bottom of the first screen they see once logged in. window.document.setTimeout('ajaxFunction()',0); That should do it. Quote Link to comment Share on other sites More sharing options...
anushka Posted March 28, 2008 Author Share Posted March 28, 2008 Thanks a lot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.