• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

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.
0
thomas908
Asked:
thomas908
  • 3
  • 2
  • 2
2 Solutions
 
WebstormCommented:
Hi thomas908,

The right TA for this question is
http://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, ...).
0
 
thomas908Author Commented:
>>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.
0
 
WebstormCommented:
Then there is no solution.
0
Sign your company up to try the MB 660 headset now

Take control and stay focused in noisy open office environments with the MB 660. By reducing background noise, you can revitalize your office and improve concentration.

 
Mayank SAssociate Director - Product EngineeringCommented:
>> 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.
0
 
thomas908Author Commented:
>>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..
0
 
Mayank SAssociate Director - Product EngineeringCommented:
But practically, how do you expect the same person to be present at 2 systems at the same time ;-) unless he abandons one session or somebody else uses the same user-ID. The problem is that HTTP is a request/ response model so you can't push anything to the browser/ client directly without having a request/ refresh from it. You might want to use something like AJAX for doing some asynchronous processing at the client end and to refresh the page asynchronously with correct data.
0
 
thomas908Author Commented:
May be i should explore Ajax...
0

Featured Post

Eye-catchers on the conference table

Challenge: The i-unit group was not satisfied with the audio quality during remote meetings. They were looking for a portable solution with excellent audio quality for use in their conference room but also at their client’s offices.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now