How can I access a variable from an iFrame's page in PUI?
Posted: Fri May 31, 2013 3:36 pm
I have a PUI page that is defined as a window that has an iFrame container that runs a RPGsp page via the URL executed by the iFrame.
There is a variable on the RPGsp page (in the iFrame) that is set to True once a change has been made in a text area on the page.
Is there a way for the PUI page to access that variable so that the PUI page (the main window) can know if changes have been made on the RPGsp page (in the iFrame)?
Also, currently the user must submit the RPGsp page in the iframe to save their changes and then click Close on the PUI window/page to close the window.
My first goal is to be able to warn the user if they try to close the PUI window after making changes on the RPGsp page in the iFrame but have not submitted the changes via the RPGsp page's Submit button.
My second goal is to find a way to automatically close the PUI window once a successful Submit has taken place in the iFrame, but I'm not sure that's even possible.
I've researched this and found some html examples where variables of an iFrame can be accessed using something like where iFrameName is the iFrame's Name property and the varName is the variable within the iFrame.
I don't see the Name property in the PUI designer for an iFrame.
Is there a way to do this in PUI?
There is a variable on the RPGsp page (in the iFrame) that is set to True once a change has been made in a text area on the page.
Is there a way for the PUI page to access that variable so that the PUI page (the main window) can know if changes have been made on the RPGsp page (in the iFrame)?
Also, currently the user must submit the RPGsp page in the iframe to save their changes and then click Close on the PUI window/page to close the window.
My first goal is to be able to warn the user if they try to close the PUI window after making changes on the RPGsp page in the iFrame but have not submitted the changes via the RPGsp page's Submit button.
My second goal is to find a way to automatically close the PUI window once a successful Submit has taken place in the iFrame, but I'm not sure that's even possible.
I've researched this and found some html examples where variables of an iFrame can be accessed using something like
Code: Select all
window.iFrameName.varName
I don't see the Name property in the PUI designer for an iFrame.
Is there a way to do this in PUI?