Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Alberto Cavallina
2
Views
2
Comments
Timer, Screen Action
Question
I am trying to build an action in order to redirect the user back (not just at log in but if other errors happen ("You will be redirected back in 6 seconds" )
I wonder if would be possible to start a screen action at the start of a Webscreen without using a timer (a sort of extended Property: "onopen" like in excel VBA).
The preparation action is not want I want since every action is evolved before the user see the page.
Thanks.
Alberto Cavallina
Paulo Almeida
Greetings Alberto,
You can get the result you want with a bit of JavaScript code.
Start by adding a button to your page. Set the destination of this button to the screen action or web screen you want to redirect to. To use the javascript below verbatim the button must be named HiddenButton.
Now we need to add some javascript code that will simulate a user click on this button. To do this:
1. select the web screen and edit its extended properties.
1.1. Add the following javascript to the WebScreen JavaScript:
function pressButton () {
document.getElementById('wtHiddenButton').click();
}
1.2. Add a property with name onload and value "setTimeout('pressButton()',6000);" (the quotes " " around the value are important).
2. Finally, to hide the button select it and edit its extended properties. Add a new property named style with value "display:none;"
I have attached an OML that exemplifies exactly what I have described. The relevant screen is named RedirectScreen.
I hope this is what you were looking for.
Best regards,
Paulo Miguel
RedirectSample.oml
1 reply
28 Sep 2005
Show thread
Hide thread
Alberto Cavallina
Thanks a lot Paulo,
What can I say more?
This is right what I wanted !!!
I have just done the same and it works perfectly.
Best regards,
Alberto
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...