Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mike on Nov 07, 2008 14:50
open dhtmlx forum
Interacting between layout frames

I am testing the layout class to see if we can use it to redesign our website. our website currently uses the ESRI tools for manipulating map information. As such we have 1 main pane (<div>) that displays the map and other tabbed panes that provide functionality for interacting with the map.

In designing the initial layout I put together the following:

var dhtmlxSkin = "dhx_black";

function initScreenLayout() {
var dhxLayout = new dhtmlXLayoutObject(document.body, "3T", dhtmlxSkin);
dhxLayout.cells("a").hideHeader();
dhxLayout.cells("a").setHeight(86);
dhxLayout.cells("a").attachURL("http://localhost:7001/dhtml/header.jsp");
dhxLayout.cells("a").fixSize(false, true);
dhxLayout.cells("b").hideHeader();
dhxLayout.cells("b").setWidth(1400);
dhxLayout.cells("c").hideHeader();
    
var dhxLayoutLeft = new dhtmlXLayoutObject(dhxLayout.cells("b"), "2E", dhtmlxSkin);
dhxLayoutLeft.cells("a").hideHeader();
dhxLayoutLeft.cells("b").hideHeader();
}

1. Must you specify a full URL (as opposed to a URI) to load a page in the frame? It looks like this is using something like a frameset.
2. If I have to load URLs, which implies separate pages, in each frame, how do I get the objects from the separate frames to interact with each other? For example, in our main pane we display the map. As the mouse moves over the map we update a coordinate field in one of the form fields of a tabbed pane entry (if the tab is not selected the field is not displayed/updated).
If we used the layout here how would we get the system to update the form field in another frame? In a single page it is easy as
I can just grab the object id from the current pages form.
3. Do you have any exmaples of updating forms in one from based on user input in another form (outside of using your widgets,
i.e. grids, http://dhtmlx.com/docs/products/kb/index.shtml?ask=ask&cat=18)? Or am I not looking at this properly?

Mike
Answer posted by Support on Nov 10, 2008 04:04
1. It depends on page location. Layout use frames.

2. Navigation is standard like for the iframes.

    See the following links (maybe will useful):
    http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=6051
    http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=5847

    Inside layout's cells:
   
    page_1.html >>
    ...
    <div id="A">...</div>

    page index.html >>
    ...
    var dhxLayout = new dhtmlXLayoutObject(...);
    ...
    dhxLayout.cells("a").attachURL("page_1.html");

    if (_isIE) {
        dhxLayout.cells("a").window._frame.contentWindow.document.getElementById("A")...
    } else {
        dhxLayout.cells("a").window._frame.contentDocument.getElementById("A")...
    }

3. Could you please clarify your question?
Answer posted by Mike on Nov 12, 2008 04:37

Ah, I see from your brief snippet that the file does not need to be a complete HTML file, but can be a snippet.

But in regards to clarifying.

Our current site is basically one web page that has tabs to separate portions of the screen. Essentially the screen is divided into 2 (Left/Right) and the Right pane is divided into Top/Bottom. All 3 panes have Tabs in them that show different screens. In looking at the HTML these tabs and panes are all DIV elements. What I am trying to find out is, when using your layout for defining the split/tabbed screens how do I access the data in the individual panes? For our current website it is one huge HTML page (in essense - jsp includes, etc) so I can access any element in any tab/pan using document.getElement...(). When using your layout and tab classes, how do I access data in other tab/panes? Can I access it the same way? That is can I access it as if it was a single page or is it using iframes or framesets or what behind the scenes?

Thanks

Mike

Answer posted by Support on Nov 12, 2008 05:34
Yes, you can access them as if there is no layout.