Link to home
Start Free TrialLog in
Avatar of thomas908
thomas908

asked on

pop up issue

When the user clicks on a link, I need to get some saved values from database. If the number of saved values is equal to 10

then a pop up will be opened which will display all those saved values and there will be a delete link corresponding to each

saved value. If the user clicks on any delete link that particular value will be deleted from the database and the same popup

will be displayed with 9 values. If the max is not reached then some other page will be displayed in the same window (no pop up in this case), this page will allow the user to save some values. This process will go on till the max is reached (in that case pop up comes)

I was trying to solve this using some javascript and hidden variable. Updating and fetching the hidden variables with the current count and max count. If the count is equal then pop up a window otherwise do normal stuff.

But I have realised some problem. If the same user logs in from 2 differnet machines, then there wil be a problem (user may be able to save more than the maximum allowed).

Please let me know how should I go about it.
Avatar of Webstorm
Webstorm

Hi thomas908,

The right TA for this question is
https://www.experts-exchange.com/Web/Web_Languages/JavaScript/

For your problem, the solution is on server side, limiting access to the application once per user connection (saving user connection state in server database, ...).
Avatar of thomas908

ASKER

>>For your problem, the solution is on server side, limiting access to the application once per user connection (saving user connection state in server database, ...).

That we can't do, since its a proprietory framework and database access is done by the framework.
SOLUTION
Avatar of Webstorm
Webstorm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mayank S
>> If the same user logs in from 2 differnet machines, then there wil be a problem

Why can't you allow just one login for the user at one point of time (invalidate the previous session if he logs in again), just like many web-applications do, e.g., yahoo mail.
>>Why can't you allow just one login for the user at one point of time (invalidate the previous session if he logs in again),
That is not allowed in the application. its a requirement..
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
May be i should explore Ajax...