on 02-08-2016 3:43 PM
Hi Personas experts,
I am trying some UI events that can be triggered by the timeout function. But it seems that the timeout intervel does not effect. My JS look like this:
setTimeout(myEventHandler(),3000); //I expect the event handler func to be called after 3 secs.
and
window.setTimeout(myEventHandler(), 3000);
It seems that no matter which value I used, the handler function is called in the same time interval.
Does anyone have idea why the time interval 3000 does not have impact?
Thanks.
Dong
Hi,
there two things to note to your original question
Best Regards,
Clemens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good morning.
I'm running in to the same issue with what I think is the screen not refreshing.
I have both a field and a label on my flavor. I want an initial value of "30" displayed and then set a time / interval to count down the value every minute until the value reaches zero.
The script is counting down and I can see the countdown in the log but the field / label is not being reset. I have tried combinations of the suggestion above but it isn't working.
I am working in Personas 3.0 SP10 on Slipstream. I have tried adding the script to various screen events and nothing changes.
My script is attached. countdownscript.txt
Any suggestions are greatly appreciated.
Kind Regards,
Cristin
hi dong,
This worked for me:
function doTask(){
alert("Hello");
}
setTimeout(doTask,5000);
Sushant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The callback func did work (ie was called) in my case, but the issue is:
It did not delay 3000 ms. The function seemed to be called in the same time delay no matter what value was set. Eg, 8000 gave the same time delay.
In your example, what do you mean "worked"? Did you test different values than 5000 and did you see the different time delay? Eg, use 10000, did you get long time delay? Can you confirm this?
Thx.
Dong
Looking forward to hearing if you made any progress with this. I'm doing some testing within Personas 3.0, and am running into a similar issue. For comparison, the part I am having trouble with is simply clicking a button - here is the code I used:
function pressEnter(){
session.findById("wnd[0]/tbar[1]/btn[8]").press();
}
setTimeout(pressEnter,5000)
With the above, the button is never 'pushed.' I've messed with it all afternoon and made no progress.
Did you ever figure out how to get your setTimeout working?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.