I am making an app in Applab. I made a login page but the create id button works even if there is no value or text in the text box. I wanted to make it the way that if the user clicks the create id button he would not be redirected to the next but a message would be displayed to enter values in all the boxes..
Asked
Active
Viewed 91 times
1 Answers
0
If you create an element without any text, it'll set the text to "undefined" as a string. Instead, set the text of the element to "":
textInput("inputid", "");
onEvent("buttonid", "click", function () {
if (getText("inputid").length > 0) {
// code
} else {
// code
}
});

wutadam
- 28
- 7