Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript "top" object no longer valid when a sub-frame refreshes (In

Status
Not open for further replies.

d2army

Programmer
Joined
Jul 21, 2006
Messages
1
Location
US
Hi there!

I have this interesting problem that only happens with Internet Explorer Mobile on the Pocket PC( Mobile 5.0) and not on desktop IE.

I have a web page ( let's call it top.htm ) that contains two frames( one.htm and two.htm)

two.htm would redirect to another page at a specific time.

But what I just uncovered is that when two.htm redirects to another page(within its own frame), the Javascript within it can no longer access the "top" or "parent" object. They will show up as undefined which is weird. The same issue goes for frame one.htm

This is how I defined the two frames in top.htm :

<frameset rows="500,40">
<frame src="one.htm" allowtransparency=true marginwidth=0 marginheight=0 noresize scrolling=no frameborder=no name="one" id="one">
<frame src="two.htm" allowtransparency=true marginwidth=0 marginheight=0 noresize scrolling=no frameborder=no name="two" id="two"></frameset>

This is how I do the refreshing within the frame:

top.frames['one'].location.href = "somewhere.htm" ;

I have even tried these as well to no avail :

(1) top.frames['one'].navigate("somewhere.htm") ;

(2) self.location = "somewhere.htm" ;

Can someone please shed some light on this? If you need more details on the problem I can gladly provide them.

THANKS!
 
To:op
If the mobile ie does not include rpc module (actxprxy.dll), those cross-window communication might not be supported.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top