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.

When a page is opened make a task
#1
Hi,
is there a way to know when a page is opened in javascript? Because I want to change the color of an object when this happened.
I already know the code to change color Wink 

Thank you!
Reply
#2
Hi
Based on what do you want to change the color? JS runs when you open the page.
BR
------------------------------
Ctrl+F5
Reply
#3
You can add js script and update some object whenever you open a page maybe with some filter to not updating too often. Then you can check color some icon based on how much time elapsed from last update.
Done is better than perfect
Reply
#4
This is my problem:

I have a menu where I use "link visu-object" to open different page.
When I open a page the image of the "link visu-object" change in "pressed" and is correct. Inside this page I have a sub-menu with 3 pages using "link visu-object".
Now when I pressed a sub-menu page the related "link visu-object" change in "pressed too, but the "link visu-object" of the main menu returned with the image "not pressed".

Now I tryed to put, in the sub-menu page, the same "link visu-object" of the menu with the images reversely but the effect is horrible, when you change page the image of the "link visu-object" of  the menu flash few times.

So I would like to change the background color of the "link visu-object" when a page is opened, so I don't have to use multiple "link visu-object" one above the other and I will resolve the flashing images that are changing

Hope you can understand, because it's hard to explain, sorry

(08.10.2019, 13:10)buuuudzik Wrote: You can add js script and update some object whenever you open a page maybe with some filter to not updating too often. Then you can check color some icon based on how much time elapsed from last update.

How can I add a js script when I open a page?
Reply
#5
So you want to modify the link background based on which plan is open right?
Here is how to check which plan is open
https://forum.logicmachine.net/showthrea...43#pid7043
------------------------------
Ctrl+F5
Reply
#6
Thank you very much! It works! Big Grin
Reply


Forum Jump: