#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0

    Sending an urgent pop up


    Goodmorning/afternoon people,

    So i wasn't so sure where to put this topic but i do know im using C#, javascripting and SQL.

    So i guess i would just start with the C#.

    The story of my project is:
    a person presses a button on the website, basicly this will send an message that needs to be view fast. It look at the database for higher positions people and make a pop-up, a form or something so it will be on their screen.

    The thing to this is i don't want it refreshing the page that a higher position at. or have it display after they refresh something. So i'm not sure what i need to look at to get this started. i was looking at telerik site(can't post link) which has the tools i can use and notice that they're all controls box pops-out after clicking... now if i could get that to pop open after an message would sent, is that possible?

    Any ideas, links, tutorials are helpful and thank you for reading/replying
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0
    So i figure that i might need a eventhandler with a listener.

    But from what i'v seen there might be another step that im missing in this. .

    But not to get my hopes down, i'm going to keep trying!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    May 2004
    Posts
    3,417
    Rep Power
    887
    So far you haven't asked a specific C/C# program language question. It sounds like you need help designing/writing some sort of web base service. You should try another forum. Perhaps one of the web design forums?
    I no longer wish to be associated with this site.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0
    Originally Posted by jwdonahue
    So far you haven't asked a specific C/C# program language question. It sounds like you need help designing/writing some sort of web base service. You should try another forum. Perhaps one of the web design forums?
    Hi. Thanks for your response. I am not the same person that originally posted this, but can still use your help. We are interns at a company that has asked us to complete a project. He started just before his internship finished, and I have taken over the little bit he has accomplished. This is more suited to me than his skills as well. We are working with a SQL database, vbnet, and vbscript.

    I have a table, and when this table has information inserted, I need this urgent message to pop up at other computers based on who is logged in. This message has to popup without refreshing the page, and within 30 seconds of this information being inserted.

    I have many different proposed solutions, none of which solve my no-refresh page issue. The other parts of this project should not be an issue for me, but due to customer resource limitations, lowering our page refresh timer or leaving javascript running in the background will not work. We have also looked at using a sendkey command to send f5 for a page refresh, but are not sure if different windows / applications would not use the sendkey to refresh for the popup.

    any other proposed solutions will be entertained
    thanks for any help you guys provide, and sorry if this was originally posted in the wrong spot.
  8. #5
  9. No Profile Picture
    Offensive Member
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2002
    Location
    in the perfect world
    Posts
    622
    Rep Power
    27
    >>I have a table, and when this table has information inserted,

    So an INSERT trigger on this table.

    The trigger runs code to find who is to be notified (ie who is logged in) and sends them a message.

    >> This message has to popup without refreshing the page, and within 30 seconds of this information being inserted.

    So the popup should already be created (ready to go) within your app, but not visible (ie a hidden page or dialog / window).

    It should be created for all users who could get this INSERT notification (and not created for others).
    The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.

    Frank Zappa
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0
    Originally Posted by TechNoFear
    >>I have a table, and when this table has information inserted,

    So an INSERT trigger on this table.

    The trigger runs code to find who is to be notified (ie who is logged in) and sends them a message.

    >> This message has to popup without refreshing the page, and within 30 seconds of this information being inserted.

    So the popup should already be created (ready to go) within your app, but not visible (ie a hidden page or dialog / window).

    It should be created for all users who could get this INSERT notification (and not created for others).
    Sorry for the slow responses and thanks again for your help. this is intern work at an office that has no positions available, so the group of us isn't really in any rush to power through this.

    Would it be easier to use an insert trigger on the database, or an onclick method that runs 2 functions for the button on this website? one of these functions sends the information to the table in the database, the other sends that same information in a popup to any employee with a jobID = x.
    Also, for the popup - if it is already created, depending on how it is done, might be too resource intensive for customers. The same reason we can't afford to lower our refresh timer from 10 minutes.
  12. #7
  13. No Profile Picture
    Offensive Member
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2002
    Location
    in the perfect world
    Posts
    622
    Rep Power
    27
    Originally Posted by zztopend
    Would it be easier to use an insert trigger on the database, or an onclick method that runs 2 functions for the button on this website? one of these functions sends the information to the table in the database, the other sends that same information in a popup to any employee with a jobID = x.
    You have not given much detail of the architecture or technologies you use, so the answer is 'not sure' (if that is possible or a good idea)...

    ie a code executing on one client's browser cannot send notifications to another client's browser directly.
    Also you do not know if the UPDATE was sucessful when the button was clicked (only after the table was actually updated).


    Originally Posted by zztopend
    Also, for the popup - if it is already created, depending on how it is done, might be too resource intensive for customers. The same reason we can't afford to lower our refresh timer from 10 minutes.
    If you have trouble refreshing your page more frequently than 600 sec your app has other issues you might want to resolve first...

    Have you looked at Comet ('reverse AJAX') or SqlDependency / SqlCacheDependency objects or message queues (MSMQ) etc?

    These should have limited overhead to the client, as they are listeners.
    The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.

    Frank Zappa
  14. #8
  15. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    Moved based on
    We are working with a SQL database, vbnet, and vbscript.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0
    After much troubleshooting, I got my form inserting proper information to the database as I wanted. I was then told the information we wanted to use this form / table to track. After discovering just how much information we wanted this table to pull and store when this button was hit, we have opted for a stored procedure on the database with an insert trigger to send certain information that it has inserted and send it to employees based on their IP address and job code or employee ID.

    The stored procedure is not an issue for me. The trigger shouldn't be a big deal either. Database is my forte, if that's what you want to call it. The issue is the message that gets sent. I need help brainstorming ways to send this popup without refreshing the recipients computer, quickly, using minimal resources.

    if you need more info than I have given, I will try to be more prompt with responses.

    Using: SQL Server management studio 2008 (sue me, i'm an intern), .Net framework between 2.0 & 4.0 depending on the project, c#, and vbscript in some files (save me), visual studio 2010.
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    289
    Rep Power
    45
    Most programs that want to notify a user that action is required utilize the System Tray. That means that each user would have to have a small program that would auto start (run as a service?) to be able to intercept the message. This task has become more difficult with Session Isolation and computers that go to sleep, but it is still possible.

    J.A. Coutts
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0
    Originally Posted by couttsj
    Most programs that want to notify a user that action is required utilize the System Tray. That means that each user would have to have a small program that would auto start (run as a service?) to be able to intercept the message. This task has become more difficult with Session Isolation and computers that go to sleep, but it is still possible.

    J.A. Coutts
    Thank you very much. If the computer is asleep or idle, I do not need the message to be sent. The only time I NEED the message to popup is if they're logged in and active.
  22. #12
  23. 'fie' on me, allege-dly
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2003
    Location
    in da kitchen ...
    Posts
    12,889
    Rep Power
    6444
    What about running something as a service on the client machines set to manual, and the 'server' machine send each machine a 'net start' to startup the service (interact with desktop) which then polls for messages, and shuts the service down gracefully on exit?
    --Ax
    without exception, there is no rule ...
    Handmade Irish Jewellery
    Targeted Advertising Cookie Optout (TACO) extension for Firefox
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones


    09 F9 11 02
    9D 74 E3 5B
    D8 41 56 C5
    63 56 88 C0
    Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
    -- Jamie Zawinski
    Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...
    BIT COINS ANYONE

IMN logo majestic logo threadwatch logo seochat tools logo