Move your title part inside OK button box
Names Default To Here(1);
maintitle = New Window("Project Name",
<<Modal,
Text Box("Enter Project Name for Reports. "),
PNAME = Text Edit Box("Project Name", set width(80)),
Button Box("OK",
title = PNAME << get text()
),
Button Box("Cancel")
);
Show(title);
Other option would be to use Return Result with modal window (I think this was already in JMP16)
Names Default To Here(1);
maintitle = New Window("Project Name", << return result, <<Modal,
Text Box("Enter Project Name for Reports. "),
PNAME = Text Edit Box("Project Name", set width(80)),
Button Box("OK"),
Button Box("Cancel")
);
title = maintitle["PNAME"];
Show(title);
-Jarmo