0

How can I call a Javascript function in an iframe from its parent?

Wolfgang Blessen
  • 826
  • 8
  • 27
fog
  • 19
  • 1
  • 2

2 Answers2

1

thejh, i just asked how TO call A function in AN iframe from its parent - "function in iframe", not "function in its parent". And you didn't even read the full question. Please do it next time.

By the way, the answer is as follows:

window.frames[0].doSomething(); // but be sure the iframe is loaded before calling its functions
fog
  • 29
  • 1
  • 5
    "And you didn't even read the full question." You didn't provide a full question, let alone a complete sentence. :P – Amalgovinus Mar 23 '11 at 20:45
0

This took just half a minute of googling. And you didn't even write a full sentence. Please do it next time.

http://www.velocityreviews.com/forums/showpost.php?p=765140&postcount=2

(by the way, this only works if the domains are the same)

thejh
  • 43,352
  • 16
  • 93
  • 105