Use this board to ask questions or have discussions with other Rich Displays users.
NicoForma
New User
Posts: 1 Joined: Fri Mar 18, 2022 6:30 am
First Name: nicolas
Last Name: Matrtinez
Company Name: Robertet
Contact:
Post
by NicoForma » Fri Mar 18, 2022 6:45 am
Hi, my name is nick, i post for the first time because i have a problem.
I put in my program an iframe, where i call a program.
I would like tu use a button to update the child iframe program and then leave the program.
Actually i manage to update my iframe but my program doesn't leave onclick.
My JS looks like :
Code: Select all
getObj("IFrame1").firstChild.contentWindow.pui.click();
pui.click();
Any suggestion or idea ?
Thank you so much for your help.
Nick
Scott Klement
Experienced User
Posts: 2711 Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin
Post
by Scott Klement » Fri Mar 18, 2022 10:31 am
You are using pui.click() in the child iframe, so I guess that iframe is a Rich Display application? I think you will need to wait for that child iframe to complete it's processing before running it in the parent iframe. Otherwise, you will close the iframe before it finishes processing.
AymericPost
New User
Posts: 1 Joined: Fri Mar 18, 2022 11:15 am
First Name: Aymeric
Last Name: Post
Company Name: APlus
Contact:
Post
by AymericPost » Fri Mar 18, 2022 11:31 am
Hello, 1st timer here too. I'm a colleague of NicoForma.
Thank you for your answer, Scott Klement. Indeed, we can't do 'pui.click()' while the server is working. We found a solution using 'pui.isServerBusy()'.
Code: Select all
getObj("IFrame1").firstChild.contentWindow.pui.click();
const intervalId = setInterval(() => {
if(!pui.isServerBusy()) {
clearInterval(intervalId);
pui.click();
}
}, 200);
Scott Klement
Experienced User
Posts: 2711 Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin
Post
by Scott Klement » Sat Mar 19, 2022 7:32 pm
Thank you, Aymeric! That looks like a good solution.
Users browsing this forum: Ahrefs [Bot] , Amazon [Bot] , Baidu [Spider] , Bing [Bot] and 4 guests