Forum Moderators: open

Message Too Old, No Replies

FireFox won't accept parent property

iframe value TypeError

         

Smergler

7:35 pm on Feb 22, 2006 (gmt 0)

10+ Year Member



The parent window contains a form named 'setDates' with an input named 'datesChosen'. The parent also has an iframe.

The iframe loads a dynamic page (php) from the same site that executes javascript as it loads:

parent.setDates.datesChosen.value = "20060222,20060224";

With Explorer and Safari, the value transferes to the form input with no problems. With FireFox (Mac and Win) I get error: 'TypeError: parent.setDates has no properties'.

Has this something to do with security, maybe? Any workaround?

Bernard Marx

7:53 pm on Feb 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try:
parent.document.forms.setDates.....

Smergler

8:42 pm on Feb 22, 2006 (gmt 0)

10+ Year Member



Yes! It worked! Thank you!

Actually quite good that Firefox is strict with javascript. It is better for concise programming.