Loading ...
Sorry, an error occurred while loading the content.

Re: Autocomplete : IFrame height not updating on queries

Expand Messages
  • jennykhan
    Thanks for pointing this out! It should be fixed in the next release. Regards, Jenny
    Message 1 of 2 , Jun 29, 2006
    • 0 Attachment
      Thanks for pointing this out! It should be fixed in the next release.

      Regards,
      Jenny



      --- In ydn-javascript@yahoogroups.com, "radbradyah" <radbradyah@...>
      wrote:
      >
      > I was having trouble using an IFrame with autocomplete. The first
      > query would intialize the IFrame correctly, covering any select
      > dropdowns appropriately. As you continued to type, and subsequent
      > queries updated the content div, and changed the height according to
      > the results, the IFrame underneath the div didn't update its height
      > to match. On lines 1322 - 1329 as shown below, where the IFrame is
      > getting its height/width/marginTop set, this was setting it to 0 on
      > subsequent queries.
      >
      > ***********************
      > if (bShow && oContent && oIFrame) {
      > var sDisplay = oContainer.style.display;
      > oContainer.style.display = "block";
      > oIFrame.style.width = oContent.offsetWidth;
      > oIFrame.style.height = oContent.offsetHeight;
      > oIFrame.style.marginTop = "-"+(oContent.offsetHeight + 25)
      > +"px";
      > oContainer.style.display = sDisplay;
      > }
      > ***********************
      >
      > I'm not sure why its getting set to 0 there, but to bypass the
      > problem temporarily, I modified lines 1396+ to look accordingly:
      >
      > ***********************
      > // Else don't animate, just show or hide
      > else {
      > this._bContainerOpen = bShow;
      > oContainer.style.display = (bShow) ? "block" : "none";
      > //*****Added to fix IFrame height update issue
      > if( oIFrame) {
      > oIFrame.style.height = oContainer.offsetHeight;
      > oIFrame.style.width = oContainer.offsetWidth;
      > }
      > //*****End of addition
      > // Call event on expand/collapse (overriden by client)
      > ***********************
      >
      > I turned off animations so it wouldn't bypass this code section for
      > the time being. I'd be interested to hear if anyone else is having
      > similar issues, and if its something that may be in progress of
      > being fixed. For the time being this fixed the problem for my
      > limited use of the code, although I'm sure it doesn't cover all the
      > bases, i.e. animations enabled.
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.