Forum

Accueil » Alloy UI » English

Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Richard Lee
Anyway to add confirm button to alert messages?
27 août 2014 05:45
Réponse

Richard Lee

Rang: Junior Member

Publications: 28

Date d'inscription: 18 janvier 2011

Publications Récentes

Hi all
I want to inject a button into the Session time out message that appears at the top of the page so users can confirm and hide the message as we're finding some users try to interact with page then get redirected and send support request.

Anyway to do this via jQuery/ JS via listening to an event and injecting the button?
David H Nebinger
RE: Anyway to add confirm button to alert messages?
27 août 2014 06:07
Réponse

David H Nebinger

Rang: Liferay Legend

Publications: 7252

Date d'inscription: 1 septembre 2006

Publications Récentes

there's already a button that appears when the session is going to time out.

a button after session times out doesn't do any good as the session is already done.

instead you should add session.timeout.redirect.on.expire=true to redirect for them.

it really is the best thing, anything they were doing in the page is guaranteed to fail (because the session is invalid, the user is now invalid, ...).
Soukaina HAJI
RE: Anyway to add confirm button to alert messages?
29 août 2014 09:37
Réponse

Soukaina HAJI

Rang: Regular Member

Publications: 196

Date d'inscription: 17 juin 2014

Publications Récentes

Which error messages ur talking about ?
Richard Lee
RE: Anyway to add confirm button to alert messages?
16 septembre 2014 20:24
Réponse

Richard Lee

Rang: Junior Member

Publications: 28

Date d'inscription: 18 janvier 2011

Publications Récentes

David H Nebinger:
there's already a button that appears when the session is going to time out.

a button after session times out doesn't do any good as the session is already done.

instead you should add session.timeout.redirect.on.expire=true to redirect for them.

it really is the best thing, anything they were doing in the page is guaranteed to fail (because the session is invalid, the user is now invalid, ...).


What Im trying to do is stop people losing information they've entered into a forms etc because at the moment if they overlook the timeout message and hit submit they'll be redirected and lose their content. My idea was to add and overlay then an "OK" button within the timeout message that users would then need to click remove the overlay and give them an opportunity to copy and safe ay content
David H Nebinger
RE: Anyway to add confirm button to alert messages?
17 septembre 2014 05:49
Réponse

David H Nebinger

Rang: Liferay Legend

Publications: 7252

Date d'inscription: 1 septembre 2006

Publications Récentes

Richard Lee:
What Im trying to do is stop people losing information they've entered into a forms etc because at the moment if they overlook the timeout message and hit submit they'll be redirected and lose their content.


Well you have to remember that this is an odd case. Either your session timeout is too low (such that the average person cannot complete the form in the time you've given them) or they simply don't care if they complete in a timely manner.

The first can be resolved by increasing your timeout (i.e. if you have timeout at 5 mins, set it to 10 to give folks time to finish the form).

If it's the "people don't care" part, and you're at like 30 minutes with your timeout, then they really have other problems than the timeout itself. For these folks you can sometimes fix this by extending the timeout (i.e. if you bump it to 45 mins and they expect it to be 30, so they'll typically complete before the 45 runs out trying to beat the old 30) or by enabling auto-extend (this is not popular because if a user keeps their browser open all night, they'll keep an open session w/ the Liferay instance that long also, and before you know it the user's nonchalance at completing the form in the original 30 mins will just get worse).

Sometimes you can fix this using the "redirect after session expire" setting. Using this setting, the user is redirected back to the home page (or whatever page) automatically, their form won't still be sitting there visible for them to try submitting after the fact. You will get similar feedback that you're getting now, but eventually those users will learn that they have to complete the form before walking away from their desks or getting distracted w/ something else.

My idea was to add and overlay then an "OK" button within the timeout message that users would then need to click remove the overlay and give them an opportunity to copy and safe ay content


Admirable, but not sure it's going to work - if they're missing the bar to extend now, not sure they'll see the overlay either.

That being said, I believe the Liferay session handling javascript is in session.js. So you can see in here how the JS to show the bar is handled and possibly replace it with the overlay.

I would look at the users who this happens to and try to analyze what is going on... Are they the easily distracted type that will start the form and just turn away without completing in time? Those folks you won't be able to do much for. But if it's a real-life business need, i.e. user must turn away to deal with customer, or a piece of machinery, or must take some readings or whatever, it's quite possible that your timeout is just too low and it must be increased to alleviate the issue. If it's this kind of thing happening, all the fancy overlays in the world will not eliminate the business need for a longer session time.