Providing Popup reminders for events

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Oct 2006
Posts: 125
Reputation: bala24 is an unknown quantity at this point 
Solved Threads: 11
bala24's Avatar
bala24 bala24 is offline Offline
Junior Poster

Providing Popup reminders for events

 
0
  #1
Jun 11th, 2008
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.
Michelangelo

"The best place to find a helping hand is at the end of your own arm"
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 291
Reputation: ericstenson is an unknown quantity at this point 
Solved Threads: 29
Team Colleague
ericstenson's Avatar
ericstenson ericstenson is offline Offline
Posting Whiz in Training

Re: Providing Popup reminders for events

 
0
  #2
Jun 11th, 2008
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:

  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.
--
"Dummy."
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 125
Reputation: bala24 is an unknown quantity at this point 
Solved Threads: 11
bala24's Avatar
bala24 bala24 is offline Offline
Junior Poster

Re: Providing Popup reminders for events

 
0
  #3
Jun 12th, 2008
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.
Michelangelo

"The best place to find a helping hand is at the end of your own arm"
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 291
Reputation: ericstenson is an unknown quantity at this point 
Solved Threads: 29
Team Colleague
ericstenson's Avatar
ericstenson ericstenson is offline Offline
Posting Whiz in Training

Re: Providing Popup reminders for events

 
0
  #4
Jun 12th, 2008
No, the page is not always refreshing. The only time you get the page refreshing is when the pop-up appears.
--
"Dummy."
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 125
Reputation: bala24 is an unknown quantity at this point 
Solved Threads: 11
bala24's Avatar
bala24 bala24 is offline Offline
Junior Poster

Re: Providing Popup reminders for events

 
0
  #5
Jun 12th, 2008
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?
Michelangelo

"The best place to find a helping hand is at the end of your own arm"
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 86
Reputation: dexterz is an unknown quantity at this point 
Solved Threads: 3
dexterz dexterz is offline Offline
Junior Poster in Training

Re: Providing Popup reminders for events

 
0
  #6
Jun 15th, 2008
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.
Dexter Zaf
Ex-designz.net
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 125
Reputation: bala24 is an unknown quantity at this point 
Solved Threads: 11
bala24's Avatar
bala24 bala24 is offline Offline
Junior Poster

Re: Providing Popup reminders for events

 
0
  #7
Jun 18th, 2008
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?
Michelangelo

"The best place to find a helping hand is at the end of your own arm"
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC