Solved

Firefox and Chrome frame OnResize not working

Posted on 2012-03-26
3
1,312 Views
Last Modified: 2012-03-28
I am trying to capture when a frame is resized.  This works perfect in IE but not at all in Firefox or Chrome.  Everything I have read says it should work, so I must be doing something wrong.  Can anyone please help?

Code:

test.html
<html>
<frameset cols="*,*" border=15>
  <frame id=frmFrame src="frame.html" onload="alert('load');">
  <frame id=frmFrame2 src="frame2.html" onresize="alert('resize');">
</frameset>
</html>

frame.html
<html>
<body bgcolor=green>
&nbsp;
</body>
</html>

frame2.html
<html>
<body bgcolor=red>
&nbsp;
</body>
</html>
0
Comment
Question by:stuart100
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
Comment Utility
Here

<frameset cols="*,*" border=15>
  <frame id=frmFrame src="..." onload="alert('load');">
  <frame id=frmFrame2 src="..." onload="var win = this.contentWindow?this.contentWindow:this;win.onresize=function(){parent.document.title = 'resized @'+new Date();}">
</frameset>
</html>

Open in new window

0
 

Author Comment

by:stuart100
Comment Utility
Thank you for the solution, I am giving you the points.

Can you explain though your code.  I think what is going on is that Firefox is not correctly registering the onresize event to the frame or using the wrong container?  Is this correct?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
Fx has a different Dom access than ie. it is now standard on new browsers
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now