lock orientation

Hi,

Is there a way i can lock the orientation using dhtmlx or javascript?

In landscape mode the app sometimes jumps between views, can’t find a reason why it would do that? Also are input fields emptied when changing orientation.

Thanks in advance!

Hello,

Is there a way i can lock the orientation using dhtmlx or javascript?

There is not possibility to lock orientation via javascript.

Also are input fields emptied when changing orientation.

If an input is redrawn after orientation change and its value has not been saved, the value will be changed to initial.

You may try to use the following approach to get form values and restore them after rotate:

[code]var values;
/*
onBeforeRender event is called
before a view is rendered
*/
$$(“someFormField”).attachEvent(“onBeforeRender”,function(){
values = $$(“yourForm”).getValues();
});

dhx.attachEvent(“onRotate”,function(){
if(values)
$$(“yourForm”).setValues(values);
}); [/code]

In landscape mode the app sometimes jumps between views, can’t find a reason why it would do that?

This issue is not clear. Could you provide some example ?