1

I'm trying to include speaking into my webpage. To do this I am trying to use iframes pointing to http://text-to-speech.imtranslator.net/ I plan to make it invisible so it doesn't affect the layout and then interact with it with javascript to set the value of the text area & click the button to make it speak.

An answer on here said to do "myframes.window.getDocumentById". However using window/getDocumentById leads to "permission denied" with accessing that property. Could it be that the website/browser (I use firefox) has disabled such interactions? Or am I just doing it wrong?

Dird
  • 325
  • 2
  • 3
  • 12
  • If the domain of the iframe is different to the domain of the parent window the browser will block the request due to the Same Origin Policy. – Rory McCrossan Feb 12 '13 at 16:11

1 Answers1

0

You cannot access document of an IFRAME if it is in other domain name.

If you have control of the website that you open in the iframe, you can use this method:

http://stackoverflow.com/questions/6460200/can-cross-origin-resource-sharing-headers-authorize-x-domain-iframe-access
Shluch
  • 423
  • 4
  • 13
  • I gathered that OP didn't have access to the domain text-to-speech.imtranslator.net. – Michael Reed Feb 12 '13 at 16:12
  • Mike is right, I don't have it~ how can this not be the case? someone online created a website which automatically collected lots of data from another website, why can't I click a button on another website? – Dird Feb 13 '13 at 07:46
  • If I can't do it using iFrames then how can i do it? – Dird Feb 13 '13 at 08:08