Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
I am working in a project where i have to show a popup message to a particular user that is

user 1 : pharmacy user
whenever this user prepares (purchase medical items) and clicks on save button. the details are saved in the database.
after saving,

user 2: medical store user

the notification has to be popup to this user.
whichever page this user in (in the application) the notification should be shown to that user).

NO problems in giving rights and purchasing items
give me solution in asp.net

I hope you all understand
Posted
Comments
Dalek Dave 11-Jun-10 5:11am    
Good Question.

So what is the problem.
For 1: Register a startscript if the data is saved and in startscript you can put a javascript function to show the message.

Similarly you can do for second case based on your requirement.
 
Share this answer
 
The easiest way to do this is like

1. Create a javascript function to fetch async data (may be using http request) from your database and check if there is any new purchase order.
2. Run this function in a specific time interval.
3. If there is any new orders create a pop window and show the new orders.
4. In this order popup form put Accept button.
5. On click on the Accept button update those "new orders" to "shown orders".

Although there are other ways to show a do this but this will be the easiest way.
 
Share this answer
 
Your only solution would be to make constant AJAX calls to identify the current user ( or just do a check in a base class for every page, if you can wait until they change pages ), and then get the message to show from the database, where it's initially stored.
 
Share this answer
 
you can show popup by using

response.redirect("alert('this is popup')");

regards
koolprasad2003
 
Share this answer
 
Comments
Christian Graus 11-Jun-10 10:03am    
This is both wrong, and does not answer the OP at all. Why do you need to use response.redirect ? How does it help his question ? I'm sure he knows how to show a popup - did you read the question ?
Christian Graus 11-Jun-10 10:04am    
Reason for my vote of 1
Does not answer the question at all.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900