dhtmlxLayout attachURL - how to pass parameters back and for

Take layout pattern 2U.

What is the recommended way of passing parameters from

1) a to b and back

2) b to a?



From (a) I want to attach a php form in (b)

And I want to pass parameters from (a) to (b) for use in the form (as display text and as default input values).



What is the recommended way of passing parameters a -> b?

From (a)

1) attachURL using URL with GET method to pass parameters or

2) or use :

var frame = layout.cells(“b”)._frame;

frame.contentWindow.document.getElementById(“myId”).innerHTML=myparameter;

(This does not seem to work immediately after attachURL - maybe browser has not completed loading?)



What is the recommended way of passing parameters b -> a?

I think this must be a function call: eg parent.func(params…) ?


Hello,


>>This does not seem to work immediately after attachURL - maybe browser has not completed loading?)


You can set onload event handler in the page loaded inside “b”:





In this case doOnBLoaded() function is defined in the page with layout


function doOnBLoaded(){var frame = layout.cells(“b”)._frame; … }


>>What is the recommended way of passing parameters b -> a?I think this must be a function call: eg parent.func(params…) ?


Yes, you can try to use parent.func(params…)

Using   does not work for me as I will have lost the data I wanted to pass across when doing the attachURL.

I think using GET in attachURL(‘someurl?param1=x’) will have to do the job.
Need to amend the form to cater for this submit.


Yes, you can use the get request to pass the parameters.


As another solution for getElementById(“myId”) you can use onContentLoaded event. The sample is dhtmlx.com/docs/products/dhtmlxW … 2134190000