Accessing content of a site embedded in an IFrame using scripting

I have a somewhat unique usecase for the IFrame component and I was hoping someone could help me understand if this is realistically possible.

Situation: There is an external site that we plan to use often in our day to day processes. The site contains a form which the user fills out and submits. We do not have an integration with this external site, so we cannot get field data into our database, thus users will have to write the information twice (once into external site, once into our DB).

To avoid the redundant step, I was wondering if there is a way for me to access the HTML source code of the IFrame through scripting in Perspective. If I can, then it is possible to extract the values of the fields.

If anyone has another suggestion for a solution to this problem, I’d appreciate some advice.

You don’t have access to any HTML via Perspective scripting. Even if you did, I doubt any modern browser engine lets you do this - iframes are already a bit of a security headache, and allowing access to the inner content is basically impossible from the ‘outer’ frame.

It might be feasible to recreate the form in Perspective and programmatically submit the content to this external web service.

2 Likes

I was afraid of this. Thank you for the information, Ill try to find alternative solutions.

Maybe the site has an api which you can call with the web module?