Hi,
I'm having some problems with javascript/frames when trying to get a function to load from one frame into another. I'll outline the problem below...
- have got a frameset.
- have got a javascript function in frames[2] called init
- init returns a value
- am trying to call the javascript function in frames[2] from frames[0], and display the result.
In netscape it works fine, but in IE it returns the result back into frames[2] instead of being in frames[0] - the frame I'm calling it from.
There is one odd thing about it - I can test it with another simple function and it returns the result fine in both browsers using this in the body...
<SCRIPT LANGUAGE="JavaScript">
document.write(parent.frames[2].testing());
</SCRIPT>
But when I change the function above to call init() instead it returns 'undefined'.
Not sure why it would be undefined in one browser and not the other - anyone have any ideas?
Cheers,
Regan.
I'm having some problems with javascript/frames when trying to get a function to load from one frame into another. I'll outline the problem below...
- have got a frameset.
- have got a javascript function in frames[2] called init
- init returns a value
- am trying to call the javascript function in frames[2] from frames[0], and display the result.
In netscape it works fine, but in IE it returns the result back into frames[2] instead of being in frames[0] - the frame I'm calling it from.
There is one odd thing about it - I can test it with another simple function and it returns the result fine in both browsers using this in the body...
<SCRIPT LANGUAGE="JavaScript">
document.write(parent.frames[2].testing());
</SCRIPT>
But when I change the function above to call init() instead it returns 'undefined'.
Not sure why it would be undefined in one browser and not the other - anyone have any ideas?
Cheers,
Regan.