NetTalk Central

Author Topic: Memory form in Iframe  (Read 3239 times)

ntnewbies

  • Full Member
  • ***
  • Posts: 184
    • View Profile
    • Email
Memory form in Iframe
« on: May 27, 2022, 02:57:21 AM »
hi friends,
i put a nettalk memory form in a iframe html page.
i could load it correctly.
but that memory page contains a button where it will trigger an api call (means calling a window).
If the page is served under iframe, the button dont work.
Is there any workaround to fix this or nothing can be done?

Your idea please

regards,
Jason
c11
nt12.41

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Memory form in Iframe
« Reply #1 on: May 27, 2022, 04:31:59 AM »
browsers restrict what iFrames can do, especially depending on if the iFrame is populated by another server.
So you will need to explain your context in more detail, so I can then point you in the right direction.

cheers
Bruce

ntnewbies

  • Full Member
  • ***
  • Posts: 184
    • View Profile
    • Email
Re: Memory form in Iframe
« Reply #2 on: May 29, 2022, 07:52:06 PM »
hi bruce,
the html pages are in apache server. it calls nettalk server in iframe (ie the memory form).

regards,
Jason
c11
nt12.41

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Memory form in Iframe
« Reply #3 on: May 30, 2022, 01:07:07 AM »
running an iframe from one site, inside another site can be tricky, because browsers are explicitly set up to avoid this sort of thing. For many reasons it's "not ok" so by default it's not allowed.

Your server has a couple options (runtime, settings, site tab) which control some of this.
x-frame-options and access-control-allow-origin are two.
I recommend googling these headers. like
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

but to be honest, this isn't a route I would recommend - it's likely to get more and more unavailable in the future.

Cheers
Bruce