Ok, I got to work for the validation of my return route segment widget. I wanted to add the following validation to my get location from coordinate widget. But the onClick does not seem to close the function. Any ideas?
_onlatlongClicked: function () {
GLOBE.wkid = 4326;
if (this.LatTextBox.value) {
if ((!isNaN(this.LatTextBox.value) && !isNaN(this.LongTextBox.value))) {
var Lat = this.LatTextBox.value,
Long = this.LongTextBox.value,
LocPoint = new Point(Long, Lat),
mp = {
mapPoint: LocPoint
};
} else {
var qMessage = new Message({
type: 'Error',
titleLabel: "Invalid Corrdinate",
message: "Please re-enter valid valid coordinate",
button: [{
label: "Data Entry Error",
onClick: lang.hitch(this, lang.hitch(this, function () {
qMessage.close();
}))
}]
});
}