I have a script that creates a form . I have a check at the beggining of the form to see if the user is a Project Admin, if not then I want the form to close right away. I cannot get it to close.
use strict variables;
use strict semicolons;
//var db_output = HostApp.getDatabase();
var f = new ControlsForm;
f.center();
f.show();
Application.run();
class ControlsForm extends Form
{
...
...
function ControlsForm()
{
...
...
var EnvUserID = Environment.getEnvironmentVariable("USERNAME");
EnvUserID = EnvUserID.toUpperCase();
// Get Userid to see if it is a Project Admin
var ProjAdmin = dbP.execute("Select UserID From ProjectAdmins");
while (ProjAdmin.next())
{
myUserID = ProjAdmin.UserID.toUpperCase();
if (myUserID == EnvUserID)
{
isadmin = true;
}
}
if (isadmin == false)
{
alert("You don't have rights to add new projects");
//return;
//onButtonExitClicked();
Application.exit();
}
Kirix Support Forums
close form/script
2 posts
• Page 1 of 1
Re: close form/script
Hi there,
Can you try calling
You can see the full documentation for the Form class here http://www.kirix.com/docs/Form.html
All the best,
Ben
Can you try calling
- Code: Select all
this.close()
You can see the full documentation for the Form class here http://www.kirix.com/docs/Form.html
All the best,
Ben
Ben Williams
Kirix Support Team
Kirix Support Team
-
Ben - Kirix Support Team
- Posts: 525
- Joined: Mon Dec 19, 2005 6:29 am
2 posts
· Page 1 of 1
Return to Strata Help & Feedback