Get Window Name

How do you get the name of the window or dialog e.g. application.getWindowName () ??? seems you can get height, width location but where do you get the name.

For example I want to close the first form that the solution opens from another form but what is its default name or how do I specify it.

Also while Im asking how do you in web client remove the title on the window of the form where it says Solutioin Name, Form Name then the " Servoy Web Client ". I know I can use title text of thee solution and form name but it still leaves the "servoy web client’

thanks.

the name you should know your self, else how do you know which window name to get?
If you want to know it for a specific form you can ask the form:

form.xxx.controller.getWindow()

that will return the window the form is in if that window is visible.

jcompagner:
e name you should know your self, else how do you know which window name to get?

I know the form name is that the window name ?

when I tried as hyou suggested …controller.getWindow() it says theres no such function “TypeError: Cannot find function getWindow.”

The reason I want to lnow is I have a form thats loaded as first form of the solution then the last thing it executes is an

application.showFormInWindow followed by a application.closeForm() except it closes the window I just started not itslef.

I haven’t specified a name for the first window so how do I close it or how do I get its name to close it ?

getWindow() is a Servoy 6 method

see the doc of showFormInWindow::

@param windowName optional The name of the window; defaults to “dialog” if nothing is specified. Window and dialog names share the same namespace.

But please, do specify the window name, be explicit.

Maybe I haven’t explained this correctly but when Servoy starts the solution its starts a form that I specified as the first form. I have no idea where the window name is specified or what the name is hence I guess it must be the default.

So after this first form is started it then then starts another form (showforminwindow) which yes I do give it a name.

Now in this second form I want to close the first window (i,e form) but when I try application.closeForm(‘dialog’) it does not close it.

As I said earlier in the earlier posts when I’m in the first form I issue an application.closeForm either before or after I start the second form (application.showforminwindow) the application.closeform closes the second form.

I have this code in the first form, if I change it to application.closeForm(‘dialog’) it does not close it either.

    application.showFormInWindow(forms.frm_main,-1,-1, -1,-1,'Main',false,true,'Main')

    application.closeForm()

Hence why Iam asking what is the name of the first form and how do I close it without impacting the second form ?