Brian Suter Posted September 10, 2021 Share Posted September 10, 2021 Your fex can return a custom html (look at -HTMLFORM) which can have embeded JS in it which can pass the key value to its parents window. If the parent HTML was loaded from the same host:port there should be no cross site scripting issue. Something like: -SET &NewKeyValue = -HTMLFORM BEGIN <html><body> <script> if window.parent.setNewKey { window.parent.setNewKey(&NewKeyValue); } </script> New key is &NewKeyValue </body></html> -HTMLFORM END Link to comment Share on other sites More sharing options...
Chad Smith Posted September 10, 2021 Author Share Posted September 10, 2021 It worked. I used your code in my FEX and in HTML defined the function as below function setNewKey(NewKeyValue){ IbComposer_getComponentById(NewKey).value = NewKeyValue; } Thank you Brian. Link to comment Share on other sites More sharing options...
Chad Smith Posted September 10, 2021 Author Share Posted September 10, 2021 I am developing a interactive page where the user can read/insert/update a data. I am using a unique sequence number as my key to table and auto populating in the Fex. I am running the Fex within a frame of my HTML to display the message back to user on whether the insert or update is successful or not. Issue I am facing is when the user insert a new data, I want to publish the key back to the HTML. I am currently displaying the key back to the user as part of message. Wondering if there is a way to use JS to pull the value from the Fex to HTML. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now