dynifs on opera increasing height too much? [solved]
 
 
Post new topic   Reply to topic   printer-friendly view    phpMiX.org Forum Index -> Widgets Discussion -> Javascript Snippets
View previous topic :: View next topic  
Author Message
huckfinn
Starter
Starter


Joined: 27 Jul 2006
Posts: 2

PostPosted: Thu Jul 27, 2006 6:06 am    Post subject: dynifs on opera increasing height too much? [solved] Reply with quote

hi guys,

did you try dynifs in the latest version in opera? i'm having some bugs here Sad , the bottom of my iframe is keep increasing and increasing and creating some whitespace. is there a fix on this?

thanks Wink
 
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Thu Jul 27, 2006 7:40 am    Post subject: Reply with quote

I haven't checked with any Opera 9 build yet. Please, give me a couple of days and I'll try to see...

On a side note, I've seen that effect when coding the snippet and I had to do something to avoid it... although I don't remember the details now, I believe that will help me when I try it... Wink

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Sun Jul 30, 2006 12:49 am    Post subject: Reply with quote

Ok, I've found the problem. Not sure if the solution is nice/reliable enough though.

...for some reason, now in Opera 9, after this line of the resize method:
Code:
if( document.all ) div.style.height = '0px';

we need to force a delay, so the getDim function returns the correct dimensions of the IFrame'd document.

A possible fix would be... in dynifs.js

FIND:
Code:
      // Resize the IFrame container.
      var dim = this.getDim(iframe.document);
      div.style.height = (dim[1]+30) + 'px';

REPLACE WITH:
Code:
      // Resize the IFrame container.
      if (window.opera) {
         // Opera 9 needs a slight delay, so getDim can get the correct dimensions.
         setTimeout('var dim = DYNIFS.getDim(window.frames[\''+id+'\'].document); document.getElementById(\''+id+'\').style.height = (dim[1]+30) + \'px\';', 1);
      }
      else {
         var dim = this.getDim(iframe.document);
         div.style.height = (dim[1]+30) + 'px';
      }

That is, we're doing the same exact thing, but for Opera, we do it from within the setTimeout context, just after one millisecond ...that was enough in my computer.

Please, let me know if that fixes it.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
huckfinn
Starter
Starter


Joined: 27 Jul 2006
Posts: 2

PostPosted: Mon Jul 31, 2006 7:43 am    Post subject: wow it works great! :D Reply with quote

thanks markus it works or me now... your great man, your da man...
i think you fix it.

thanks again.
huck
 
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    phpMiX.org Forum Index -> Widgets Discussion -> Javascript Snippets All times are GMT + 1 Hour
 
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum