Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have the hyperlink in table. when the user click on the link it suppose to open the document.

The challenge of the task is, when one person open the document, then the other person should not open the document.

It should say some alert saying "This person opening the document,pls. contact person to close the doc"

How to track when person open the document then the other person should get alert message as soon as click the link.

unless or untill user close the document, then the document link should be enable to open other person.

How to handle this type of scenario...?


What I have tried:

i am thinking how to handle this problem and which method i can use
Posted
Updated 5-Mar-19 21:03pm

1 solution

The hyperlink can't go direct to the file: it has to go to a webpage (possibly with a identifying query string) which checks the DB and either serves the file or displays a message.

Your problem is "closing the file" - unless the remote client is forced to tell you when he closes it, there is no way to tell what he did with it: if he saved it and opened it in Adobe, viewed it via his browser, or just unplugged his PC and walked away. There is no signal that can tell you any of this!

You can add a timeout, similar to the session timeout which might try to prompt the user to indicate he isn't finished with it, but even then he may not get the message and continue reading.

I think you need to sit down and plan exactly what you are trying to do, as I suspect there is no good solution for the scenario you describe above.
 
Share this answer
 

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