Foren
Displaying the notice alert message
Mike Harris, geändert vor 12 Jahren.
Displaying the notice alert message
Junior Member Beiträge: 91 Beitrittsdatum: 28.03.11 Neueste Beiträge
I'm trying to debug an encoding problem with the red alert notice that shows up when the session expires.
I don't want to wait until the session expires to display it, So I want to display it "on demande".
Is there some code that I can Inject with FireBug to display it?
Something like:
<input type="button" value="test" onclick="
var obj = AUI().use('liferay-notice');
obj.text = Liferay.Language.get('warning-your-session-has-expired');
obj.show();
" />
By the way, if I try alert(Liferay.Language.get('warning-your-session-has-expired')); the text is displayed correctly. It's when it shows up in the alert bar that the encoding has a problem.
Thank you!
I don't want to wait until the session expires to display it, So I want to display it "on demande".
Is there some code that I can Inject with FireBug to display it?
Something like:
<input type="button" value="test" onclick="
var obj = AUI().use('liferay-notice');
obj.text = Liferay.Language.get('warning-your-session-has-expired');
obj.show();
" />
By the way, if I try alert(Liferay.Language.get('warning-your-session-has-expired')); the text is displayed correctly. It's when it shows up in the alert bar that the encoding has a problem.
Thank you!
Shinn Lok, geändert vor 12 Jahren.
RE: Displaying the notice alert message
Junior Member Beiträge: 89 Beitrittsdatum: 14.01.11 Neueste Beiträge
Hi Mike,
I believe what you are trying to do can be simulated by expiring the session. When logged in, go to your FireBug console and enter:
I believe what you are trying to do can be simulated by expiring the session. When logged in, go to your FireBug console and enter:
Liferay.Session.expire()