Coly010 Posted March 1, 2010 Posted March 1, 2010 ok so this is simply a popup saying you have mail. create file called: mpop.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. insert this file into the header file using You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. if i made a mistake tell me because this is my first atempt at a popup easily converted to v2 and can also be used for events Quote
Danny696 Posted March 1, 2010 Posted March 1, 2010 That'll make a button. try this: if($r['cnt'] != 0) { ?> <script type="text/javascript"> alert("You have mail"); </script> <?php } Quote
Coly010 Posted March 1, 2010 Author Posted March 1, 2010 ok i'll redo it here mpop.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Dayo Posted March 1, 2010 Posted March 1, 2010 im gona add something like this to my lite recode but it is gona have ajax so as soon as a user clicks submit it pops up Quote
Coly010 Posted March 1, 2010 Author Posted March 1, 2010 Cool dayo!! if you do acheive this please pm it to me:D (the ajax code ;)) Quote
Coly010 Posted March 1, 2010 Author Posted March 1, 2010 i dont know how to code javascript :( so if you can fix it repost it here for others Quote
Djkanna Posted March 2, 2010 Posted March 2, 2010 /me pops up and says "You have mail!" Good job Coly010 Quote
Paddy Posted March 2, 2010 Posted March 2, 2010 Not tested, please let me know how it goes and ill edit it You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
virtualshogun Posted March 2, 2010 Posted March 2, 2010 something else you can do as well is change the color and perhapse add a icon / png whatever you like that shows visually that you have a event or even mail or an announcement has been added Mainmenu.php -> if($mc > 0) { print " <table border='1' bgcolor='#F5F6CE'> <tr> <td style='background-image: url(smoke.jpg)'><td width ='140'><font color=red>Mailbox ($mc) </td> </tr> </table>"; } else { print " <table border='1'> <tr> <td style='background-image: url(smoke.jpg)'><td width ='140'><font color=red>Mailbox (0)   </td> </tr> </table>"; } Quote
Dayo Posted March 2, 2010 Posted March 2, 2010 try this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Lithium Posted March 24, 2010 Posted March 24, 2010 @ gurpreet It should fit with no problems, but if you are too picky with the code... ;) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Dave Posted March 24, 2010 Posted March 24, 2010 This will only alert them when they refresh the page, Surely it would be better to use XHR to check to see if the user has any new mail every 10 or so seconds? 1 Quote
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.