This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Change default page dinamically
#1
Hi,
I have 2 pages, the first for displaying some datas and the second for displaying important error.
Now what I would to do is:
- when there are no errors, users can only see the first page.
- when there are errors, users can only see the second page until the errors are returned to 0.
- if a users open the page after errors occurred, he must see only the second page.
- if errors occured when a user have open the first page, he must be redirected to the second page.

PS: all errors are 1 bit objects (0 = no error, 1 = error)

Is there a way to do that?

Hope that you understand what I mean, otherwise I will try to explain better! Wink 

Thanks!
Reply
#2
You can create a status object which error count and then use grp.listen and showPlan functions in custom JavaScript to check the error state. grp.listen callback is executed when object values are loaded and after each value change.
Reply
#3
Have a look at this post:
http://forum.logicmachine.net/showthread...15#pid2815
Reply
#4
Is there a way to change the default page when the value of an object change?
The javascript code in the thread you linked works only when you have the visualization open. It doesn't work if you enter in the visualization after that the object changed value.
Reply
#5
Just remove if (state == 'value') { check and it will trigger when user opens the visualization.
Reply
#6
It works! Thank you again! Big Grin
Reply


Forum Jump: