Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 5 Monaten
Letzter Beitrag:
vor 5 Monaten
Beteiligte Autoren:
David Cabrera, Piet van Zanten, Fabrice Harari

[WB20] How can I manipulate a control outside the iFrame using code inside the iFrame?

Startbeitrag von David Cabrera am 15.08.2017 18:29

Good afternoon

I have the following problem:

I have a main page that contains an iFrame where that iFrame is placed all the other pages of the system, in a certain page that is inside the iFrame I need to be able to manipulate a control that is in the same page as the iFrame, but being a Level does not recognize the control.

How can I manipulate a control outside the iFrame using code inside the iFrame?

Thanks in advance

Antworten:

Hi

it MAY be possible in classic mode (ie NON AWP), if the context of the main page is open, y using pagename.controlName.

In awp mode, each page knows only itself, and there is no context, so I don't thin it's possible.

Maybe the main page could look for value in a field (hidden?) of the page displayed in the iframe, but I'm not even sure that will work, and that probably would have to be done in JS using fields alias, as only in the browser side are the 2 pages together. So in such a case, a solution would probably to relay the information by storing in the DB on one side and reading it from there on the other.

Best regards

von Fabrice Harari - am 15.08.2017 18:59
Hi David,

An iFrame is a (html) document inside the current document.
So it canmot reference elements outside that document.
You need a HTML or RTA control.

Kind regards,
Piet

von Piet van Zanten - am 15.08.2017 19:05
Good Morning

I could not make it work, but I solved it differently.

Thanks Fabrice and Piet.

von David Cabrera - am 17.08.2017 15:21
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.