Javascript - change text automatically every 10 secodns

Pastupe
Mega Guru

Hi,
I need help please. Im beginner in javascript and I learn everething from beginning.

I created UI page.
Result is that UI page display several records each to other (kb query - gliderecord ).
I would like to display every record separately one by one changing every 10 seconds.
See example on screen that now they display all one behind another ....
Is there any change to use javascript to show my variable 1 per 10 seconds which I call $[jvar_inc_link] ?

I would like to learn this how to create code to show results from $[jvar_inc_link] every 10 seconds ..

thanks to all
Petr

23 REPLIES 23

Actually, you have the new data each iteration done with next(). Please try with {} insetad of [], f.e ${inc.next()}, ${inc.sys_id}...


Hit the Thumb Icon and/or mark as Correct, if my answer was correct. So you help others to see correct responses and I get fame 🙂

Cheers,
Kostya

It does not work. Could you control my code below please ?

I changed [] to {} and now it does not show anything.
I really dont have idea how to pass every query to be displayed from inc.uqery

Petr


Actualy, do you think the function to show and hide items is good enough to be able work together with query i have done in code ?


Kontstantin I have last question please.

Lates code you provided to me, how do I get displayed incident FORM for that incident instead of number only ?
Is there way to show every few seconds whole incident form instead only incident number ?
Please give me some advice, I would like to use lates code which you confirmed to me and which work.

Thanks a lot
Petr


Konstantin,
I have done code but when my code run, it display always only one same number. Or I can have all numbers at once.
Could you else help me pelase how to place result from query to array(dont know how to do it) and then how my code could display one by one every xx seconds ?

See file 1 - (code)
See screen 2 - how result looks on my screen - that 1x number does not change to next, that is my problem. I know how to print all records as 1st line on image, but how to display them one by one every xx seconds / that make me problem - maybe my function for displaing items in div is wrong ???
I would like to really learn this and dont know how to continue.
Thank you
Petr