943,670 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 3272
  • ASP.NET RSS
Jun 11th, 2008
0

Providing Popup reminders for events

Expand Post »
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.
Reputation Points: 15
Solved Threads: 11
Junior Poster
bala24 is offline Offline
125 posts
since Oct 2006
Jun 11th, 2008
-1

Re: Providing Popup reminders for events

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:

ASP.NET Syntax (Toggle Plain Text)
  1.  
  2. If Session("PopUpEvent") = 2 then
  3.  
  4. Response.Write("<script>")
  5.  
  6. Response.Write("window.open('WHATEVERNEWPAGENAME.aspx','_blank','toolbar=0,location=0,menubar=0,resizable=0,width=400,height=320')")
  7.  
  8. Response.Write("</script>")
  9. Response.Write("<script>")
  10.  
  11. Response.Write("window.open('YOURREMINDERPAGE.aspx','_blank','toolbar=0,location=0,menubar=0,resizable=0,width=400,height=320')")
  12.  
  13. Response.Write("</script>")
  14.  
  15.  
  16.  
  17. end if

On loading 'YOURREMINDERPAGE grab out of session the record from the database of the even that is pending.
Team Colleague
Reputation Points: 14
Solved Threads: 29
Posting Whiz in Training
ericstenson is offline Offline
293 posts
since Dec 2007
Jun 12th, 2008
0

Re: Providing Popup reminders for events

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??
Last edited by bala24; Jun 12th, 2008 at 2:35 am.
Reputation Points: 15
Solved Threads: 11
Junior Poster
bala24 is offline Offline
125 posts
since Oct 2006
Jun 12th, 2008
0

Re: Providing Popup reminders for events

No, the page is not always refreshing. The only time you get the page refreshing is when the pop-up appears.
Team Colleague
Reputation Points: 14
Solved Threads: 29
Posting Whiz in Training
ericstenson is offline Offline
293 posts
since Dec 2007
Jun 12th, 2008
0

Re: Providing Popup reminders for events

I failed to mention that I am working on .Net 2003.
I am not able to find the timer control which I assume they have provided only in 2005.

Can I do something using javascript?
Reputation Points: 15
Solved Threads: 11
Junior Poster
bala24 is offline Offline
125 posts
since Oct 2006
Jun 15th, 2008
0

Re: Providing Popup reminders for events

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.
Reputation Points: 10
Solved Threads: 3
Junior Poster in Training
dexterz is offline Offline
86 posts
since Feb 2005
Jun 18th, 2008
0

Re: Providing Popup reminders for events

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?
Reputation Points: 15
Solved Threads: 11
Junior Poster
bala24 is offline Offline
125 posts
since Oct 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Paging in datalist
Next Thread in ASP.NET Forum Timeline: populate dropdown list with table names





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC