How ignore the input when starts with 0?
Eg: if I put 23 or 023 or 00023 the function goes to page 23.
I'm using input box with mask #####
Eg: if I put 23 or 023 or 00023 the function goes to page 23.
I'm using input box with mask #####
Code:
-- search box function boxSearch() idBox = Input.GetText("box_search"); idToNumber = String.ToNumber(idBox); pnToNumber = String.ToNumber(page_name); if pnToNumber == idToNumber then Dialog.Message("Attention!", "The page is already active!", 0, 64, 0); Page.SetFocus("box_search"); end Page.Jump(""..idToNumber..""); if idToNumber ~= "" then Dialog.Message("Error!", "ID not found!", 0, 64, 0); Page.SetFocus("box_search"); end end
Comment