Export function which would include numbers AND text

Right now I am having couple of lines which work great - but on top of this I would want to include letters among numbers in my input.

So If I would like to have input1 which could include numbers AND text altogether i.e. x0987H76gG30

how my lines should be changed?

Many thanks in advance

import wixLocation from 'wix-location';

$w.onReady(function () {

});

export function button1_click(event) {
    if ($w("#input1").value == (100).toString())
        wixLocation.to("/1")
}

Hi there :wave:t2: Not sure exactly what you’re trying to do, but if you have numbers and letters together you should treat the whole thing as a string. Just put it within quotation marks.

If you were looking for a specific input you could use something like this

if ($w("#input1").value == "100")

or

if ($w("#input1").value == "x0987H76gG30")

Thank you a lot! It works like a charm :blush: this is just simple representation of password protected page with an password input and basic button.
Btw additional question, is there way to show, that “input” is incorrect? like red canvas on that text input…? :grinning:

Pay attention when working with PASSWORDS on your site!
Especialy when…
-you do it on FRONTEND
-you do it without using LIGHTBOX
-you do it without using Wix-Secrets-Manager

You are running into security-risk issues!

@russian-dima Thank you for the notice. I’ll start from secrets manager