toolbar save button submit form in layout frame

Hi,
I’m testing using the toolbar and layout components together. If I have the toolbar and I hit the save button I want to submit a form that is contained in the “b” cell of the layout. How can I control from the toolbar something that is in the “b”, “a” or “c” cells of a layout wheter it is a form or any other function?

toolbar.addButton(“save”, 3, “”, “save.gif”, “save_dis.gif”);
componentdhxlayout.cells(“b”).

Hello,

you can set onClick event handler for toolbar buttons:

toolbar.attachEvent(“onClick”, function(id){
if(id == “save”)
yourForm.submit();
})

If you don’t use attachURL method, the form is placed on the same page as toolbar. If you do use this method, you may do the following:

layout.cells(“a”)._frame.contentWindow.yourForm.submit();

Here yourForm is object of the form.

Thanks Alexandra!