?
Solved

jquery/javascript detect when object has been resized

Posted on 2011-05-01
7
Medium Priority
?
596 Views
Last Modified: 2012-05-11
Hi I have a flash object that the user can re-size (with in the flash)  problem is the i have it in a div container that does not re-size.

I there a way to detect when the flash object it re-sized and then re-size the surrounding div ?

<object width="768" height="640" type="application/x-shockwave-flash" id="movie" name="movie" data="/movie.swf" style=""></object>

The width and height changes when the resize is clicked in the flash

In the div i have overflow:none; setting it to overflow:auto; add the scroll bar but i would rather the div just resize...

Thanks in advance
0
Comment
Question by:doctor069
  • 3
  • 3
7 Comments
 
LVL 9

Expert Comment

by:Vampireofdarkness
ID: 35501520
Have you tried giving the object an id, and attaching it to a resize()? The function call could be to resize the div based on object.width() and object.height()

http://api.jquery.com/resize/
0
 

Author Comment

by:doctor069
ID: 35501548
tried that but does not seem to work...
0
 

Author Comment

by:doctor069
ID: 35501552
movie is the id of the object

 $('#movie').resize(function() {
               alert('movie');
           });
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 9

Expert Comment

by:Vampireofdarkness
ID: 35501642
HTML's onresize doesn't work unless you manually resize the element (ie- with your mouse, it doesn't fire on JS events).
jQuery's .resize() doesn't fire.
jQuery UI's .resizable() doesn't appear to work on objects, and even on DIV it needs to be manually resized.

I think you may be out of luck. Why do you need to resize the div? Is it just a container?
0
 
LVL 11

Expert Comment

by:Kusala Wijayasena
ID: 35502865
Could you please post the link to your re-sizable flash ? (just look and see what happing while resizing ....)

-Kusala
0
 

Author Comment

by:doctor069
ID: 35837293
I've requested that this question be closed as follows:

Accepted answer: 0 points for doctor069's comment http:/Q_26987991.html#35501552

for the following reason:

Not able to resize an object. Not possible
0
 
LVL 9

Accepted Solution

by:
Vampireofdarkness earned 2000 total points
ID: 35837294
I believe my answer, ID 35501642, answers this question. The answer is no, and reasons are given.

Question: I there a way to detect when the flash object it re-sized and then re-size the surrounding div ?

My Answer: HTML's onresize doesn't work unless you manually resize the element (ie- with your mouse, it doesn't fire on JS events).
jQuery's .resize() doesn't fire.
jQuery UI's .resizable() doesn't appear to work on objects, and even on DIV it needs to be manually resized.

I think you may be out of luck. Why do you need to resize the div? Is it just a container?

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

807 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