| | |
Providing Popup reminders for events
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
Hi,
I am supposed to design an outlook calendar like functionality to an existing application.
The user wants to view all reminders based on a daily, weekly and monthly basis.
I was able to solve this part by creating datatable on the fly with the reminder content and displaying with a similar look and feel.
But I am totally stumped with the reminder functionality as this would require me to create popups with javascript.
Moreover these reminders are supposed to prompt him no matter which page he is looking at.
To top it all, he requires snooze facility as well.
Any ideas to do this.
I am supposed to design an outlook calendar like functionality to an existing application.
The user wants to view all reminders based on a daily, weekly and monthly basis.
I was able to solve this part by creating datatable on the fly with the reminder content and displaying with a similar look and feel.
But I am totally stumped with the reminder functionality as this would require me to create popups with javascript.
Moreover these reminders are supposed to prompt him no matter which page he is looking at.
To top it all, he requires snooze facility as well.
Any ideas to do this.
Michelangelo
"The best place to find a helping hand is at the end of your own arm"
"The best place to find a helping hand is at the end of your own arm"
It's doable. Here is how I would attack it....
1. Drop an ASP UpdatePanel somewhere on the page
2. Create a Session variable called "PopupEvent" (Session.Add("PopUpEvent", "1")
> Set this to a value of 1
3. Put a timer in the UpdatePanel. Let it fire every 2-5 minutes
4. When the timer fires, let it check to see if there is any event in your database that is within the next (X) number of minutes.
5. If there is an event, set the Session("PupUpEvent") = "2"
5a. Create a session object to handle the Event ID / Record ID in your database of the event
6. If there is an event, enable a second timer outside of the UpdatePanel.
7. Turn off the first timer
6. When the 2nd timer is fired, turn it off, and reload the page
8. On the PageLoad call create an if statement:
On loading 'YOURREMINDERPAGE grab out of session the record from the database of the even that is pending.
1. Drop an ASP UpdatePanel somewhere on the page
2. Create a Session variable called "PopupEvent" (Session.Add("PopUpEvent", "1")
> Set this to a value of 1
3. Put a timer in the UpdatePanel. Let it fire every 2-5 minutes
4. When the timer fires, let it check to see if there is any event in your database that is within the next (X) number of minutes.
5. If there is an event, set the Session("PupUpEvent") = "2"
5a. Create a session object to handle the Event ID / Record ID in your database of the event
6. If there is an event, enable a second timer outside of the UpdatePanel.
7. Turn off the first timer
6. When the 2nd timer is fired, turn it off, and reload the page
8. On the PageLoad call create an if statement:
ASP.NET Syntax (Toggle Plain Text)
If Session("PopUpEvent") = 2 then Response.Write("<script>") Response.Write("window.open('WHATEVERNEWPAGENAME.aspx','_blank','toolbar=0,location=0,menubar=0,resizable=0,width=400,height=320')") Response.Write("</script>") Response.Write("<script>") Response.Write("window.open('YOURREMINDERPAGE.aspx','_blank','toolbar=0,location=0,menubar=0,resizable=0,width=400,height=320')") Response.Write("</script>") end if
On loading 'YOURREMINDERPAGE grab out of session the record from the database of the even that is pending.
--
"Dummy."
"Dummy."
Thanks for the prompt reply.
I think I got the hang of your solution. I was thinking on similar grounds but it seems this would lead to a performance slag due to the page getting refreshed all the time.
This application is a call center specific app which is going to run 24* 7 and multiple operators working on it.
So need to look for a minimalistic network traffic alternative.
Can you suggest something else??
I think I got the hang of your solution. I was thinking on similar grounds but it seems this would lead to a performance slag due to the page getting refreshed all the time.
This application is a call center specific app which is going to run 24* 7 and multiple operators working on it.
So need to look for a minimalistic network traffic alternative.
Can you suggest something else??
Last edited by bala24; Jun 12th, 2008 at 2:35 am.
Michelangelo
"The best place to find a helping hand is at the end of your own arm"
"The best place to find a helping hand is at the end of your own arm"
•
•
Join Date: Feb 2005
Posts: 86
Reputation:
Solved Threads: 3
Use stored procedure.
Query the date/time and use timespan, then use if else condition by comparing the date and time. I did this when working on tracking system.
Query the date/time and use timespan, then use if else condition by comparing the date and time. I did this when working on tracking system.
Dexter Zaf
Ex-designz.net
Ex-designz.net
Hi guys,
Thanks for all the responses.
I finally worked it out with javascript.
Here's how it works.
I am keeping all the day's tasks from database to a 2-D array on pageload.
This array contains the subject to be reminded about and the time.
A function keeps checking the time column every minute to check if its time to show a popup for any.
If yes, I use a window.open to show the reminder .
For snooze: I am keeping another column in the same array. Every time a reminder is snoozed, the snoozed time column of the corresponding array row gets updated by the window and the function I discussed previously checks for any snoozed reminders and pops it up at the right time.
Only issue I face is that the array needs to be passed on to all other windows so that the reminder comes up no matter which page the user is in.
Only question I have now is, Will this make the system too slow to carry out any other task?
Thanks for all the responses.
I finally worked it out with javascript.
Here's how it works.
I am keeping all the day's tasks from database to a 2-D array on pageload.
This array contains the subject to be reminded about and the time.
A function keeps checking the time column every minute to check if its time to show a popup for any.
If yes, I use a window.open to show the reminder .
For snooze: I am keeping another column in the same array. Every time a reminder is snoozed, the snoozed time column of the corresponding array row gets updated by the window and the function I discussed previously checks for any snoozed reminders and pops it up at the right time.
Only issue I face is that the array needs to be passed on to all other windows so that the reminder comes up no matter which page the user is in.
Only question I have now is, Will this make the system too slow to carry out any other task?
Michelangelo
"The best place to find a helping hand is at the end of your own arm"
"The best place to find a helping hand is at the end of your own arm"
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Paging in datalist
- Next Thread: populate dropdown list with table names
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child click commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose feedback flash flv form formatdecimal forms formview gridview homeedition hosting iframe iis javascript jquery listbox login menu microsoft mono mouse mssql multistepregistration news numerical objects order panelmasterpagebuttoncontrols parent radio ratings reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard software sql-server sqlserver2005 suse textbox tracking typeof unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml youareanotmemberofthedebuggerusers





