PDA

View Full Version : Edit Field



Marcel
09-12-2002, 02:50 AM
I have a Edit Field from password and a ok-button .
its not work, can you help me.
i have from ok-button

%ObjektText%=EditFieldObbject(Textbox).GetText
IF(%ObjektText%=Cancel)
GOTO("END")
ELSE
%PasswordPos%=GlobalList(mypassword).Find(%ObjektT ext%)
IF(%PasswordPos%=-1)
%Result%=Dialog.MessageBox("Password falsch",OK,Stop)
ELSE
Page.Jump("Page3")
END IF
END IF
END

Lorne
09-12-2002, 09:04 AM
Few things:

- you don't really need the outer IF block, since %ObjektText% won't ever be "Cancel" unless the user types "Cancel" into the Edit Field Object

- did you set up a Global List called "mypassword" with your list of passwords in it?

- do you have a page called "Page3" to jump to? Is that what you want to do when the user gets the password right?

Marcel
09-12-2002, 09:45 AM
correctly so?

%ObjektText%=EditFieldObbject(Textbox).GetText
%PasswordPos%=GlobalList(mypassword).Find(%ObjektT ext%)
IF(%PasswordPos%=-1)
%Result%=Dialog.MessageBox("Password falsch",OK,Stop)
ELSE
Page.Jump("Page3")
END IF
END

- i have Global List "mypassword"
-"Page3" to jump --- yes, i want to do when the user gets the password right?

sorry i a newuser
its not work

Lorne
09-12-2002, 10:00 AM
What part doesn't work? Are you getting an error, or is it just not jumping to Page3?

Try inserting some temporary "Dialog - Message Box" actions in there to see what the contents of your variables are at different points in that action list.

BTW...you don't need the "END" label any more now that you have removed the "GOTO" action.

Marcel
09-12-2002, 10:18 AM
i have the password 12345 and i insert it
comes an error,the"Dialog - Message Box" and jump not to "page3"

Lorne
09-12-2002, 10:21 AM
Sounds to me like you haven't added that password to the global list.

What is the error message?

If the (%PasswordPos%=-1) test is passing, and you're seeing the "Password falsch" message box, this means that the password you entered wasn't found in the global list.

Marcel
09-12-2002, 10:32 AM
can i send it per e-mail

Lorne
09-12-2002, 10:35 AM
Sure, or just attach it to a post here. But this shouldn't be too hard for you to figure out on your own...