Hi,
I created a DSPF with a Tab Panel(main DSPF). Every Tab has its own IFrame(child DSPF).
If I click on a button(Speichern) in my main DSPF I am able to change a input field in my child DSPF's. That works.
Buttons onclick:
var iframe = document.getElementById("IFrame1");
var innerDoc = iframe.children[0].contentDocument || iframe.children[0].contentWindow.document;
var box = innerDoc.getElementById("TXTSPEICHE");
parent.changeElementValue(box,'1');
My question is how can I detect the changes I made with JavaScript to the field in my child DSPF's?
Onchange or Oninput in the input field does not work. I need to place a pui.click().
I attached the main(zztst1fm) and a child(zztestdba) DSPF.
Hope you can help me!
Thanks
David
communication between DSPF and IFrame DSPF
-
- Profound User
- Posts: 24
- Joined: Fri Apr 13, 2018 4:06 am
- First Name: David
- Last Name: Baltromei
- Company Name: H. Gautzsch Firmengruppe
- Country: Germany
- Contact:
communication between DSPF and IFrame DSPF
- Attachments
-
- ZZTST1FM.json
- (3.93 KiB) Downloaded 102 times
-
- ZZTESTDBA.json
- (4.9 KiB) Downloaded 76 times
- Kaylee Law
- Profound Logic Staff Member
- Posts: 13
- Joined: Mon Sep 18, 2017 11:36 am
- First Name: Kaylee
- Last Name: Law
- Company Name: Profound Logic
- Contact:
Re: communication between DSPF and IFrame DSPF
Hello David,
Thank you for writing in.
It looks like you are trying to execute a pui.click() on the display file located inside of the iFrame (zztestdba) is this correct?
If so you can simply call the pui.click() from the button located on your main display file (zztst1fm) by adding the following line at the end of your button's onclick event:
Could you try this code and see if it accomplishes what you are looking for?
Thank you for writing in.
It looks like you are trying to execute a pui.click() on the display file located inside of the iFrame (zztestdba) is this correct?
If so you can simply call the pui.click() from the button located on your main display file (zztst1fm) by adding the following line at the end of your button's onclick event:
This code will select the PUI object located inside of the iFrame and run it's version of pui.click().var iframe = document.getElementById("IFrame1");
var innerDoc = iframe.children[0].contentDocument || iframe.children[0].contentWindow.document;
var box = innerDoc.getElementById("TXTSPEICHE");
parent.changeElementValue(box,'1');
getObj('IFrame1').childNodes[0].contentWindow.pui.click()
Could you try this code and see if it accomplishes what you are looking for?
Kaylee Law
Technical Support Specialist
Profound Logic Software
Technical Support Specialist
Profound Logic Software
-
- Profound User
- Posts: 24
- Joined: Fri Apr 13, 2018 4:06 am
- First Name: David
- Last Name: Baltromei
- Company Name: H. Gautzsch Firmengruppe
- Country: Germany
- Contact:
Re: communication between DSPF and IFrame DSPF
Hi Kyle,
great to see that only one line of code is needed to get my expected result. :)
Works great. Many thanks!
David
great to see that only one line of code is needed to get my expected result. :)
Works great. Many thanks!
David
Who is online
Users browsing this forum: No registered users and 2 guests