However, in Internet Explorer the above code does not work and it returns the error Object doesn't support this property or method. I have tried some other ways to access the method with them all returning the same error.
I even tried calling a function in iframe0 that called the function in iframe1 and that didn't even work.
After looking into the problem further, I have found that the problem I am dealing with is not related what I have asked. The answer ylebre gave below answers the question I have asked, and there for will me marked as the answer. I will probably start another question describing my problem in more detail.