tags:

views:

2878

answers:

2

For example:

$(elementid,top.document).attr(attributeName)

or

$(elementid,parent.document).attr(attributeName)

works in IE or Chrome but doesn't work in Firefox.

Does anyone know what the firefox equivalence is?

Thanks!

A: 

Try

$(elementid,window.parent.frames[0].document).attr(attributeName)

What are you trying to achieve - perhaps giving the question in context will get you better solutions.

Paul
it doesn't work. I was trying to access an element outside an iframe from a click function called inside that iframe.
Ke
+2  A: 

What about

window.parent.$(elementid).attr(attributeName);

Dhana
it works! thanks!
Ke