Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rachel H. on May 20, 2009 13:00
open dhtmlx forum
automatic scroll bar in iFrame

Hi there,

I've got a little issue.

Right now I'm opening up a new tab when someone double clicks on a row in my grid.

// Grid Functions
function doOnRowDoubleClicked(rowId, celInd)
{
var id = "a" + rowId;

var title = myGrid.cells(rowId,1).getValue();
myTabbar.addTab(id,title);
myTabbar.setHrefMode("iframes");
myTabbar.setContentHref(id, "/contact/index?contact_user_id=" + rowId);
myTabbar.setTabActive(id);
}

The new tab that opens up has the following code:

<div id="details_toolbar" width="100%" style="height:27px;padding-top:2px;"></div>

// Build Toolbar for grid
var gridToolbar = new dhtmlXToolbarObject("details_toolbar");
gridToolbar.setIconsPath("/media/icons/");
gridToolbar.loadXML("/xml/cmdetailstoolbar?user_id={$user->user_id}&r=" + new Date().getTime());
gridToolbar.attachEvent("onClick", doOnGridToolbarClick);


Everything works mostly okay, except, the width isn't really 100%. It's automatically leaving room for a scroll bar. I tried to use the style overflow:hidden but it didn't work.

Is there a way to do this?

I see an enableScroll... method in the guide, but it didn't seem to have any effect when I used it.

Thanks!
Rachel
Answer posted by Support on May 21, 2009 02:01
>>I tried to use the style overflow:hidden
To which element you have such style assigned?
To remove global scroll in iframe , such style need to be assigned to the body element of page, which loaded in iframe
<style>
       body { overflow:hidden; }
</style>
Answer posted by Rachel H. on May 26, 2009 10:17
Worked like a charm.  Thank you!