View Full Version : Password related
I have 3 pages in my application.
On the first page I placed an Input box and a button.
I would like to check if the user entered a specific password he will be transfered to Page2 else he will be transfered to Page3.
The example of Increeption/decription I found on the example forum did not work when I changed it to:
sUser =Input.GetText('Input1');
if sUser == "password" then
Page.Jump('Page2');
else
Page.Jump('Page3');
end
Any recomendation?
longedge
04-29-2008, 10:08 AM
You need to enclose strings in double quote marks e.g. "something".
Try -
sUser = Input.GetText("Input1");
if sUser == "password" then
Page.Jump("Page2");
else
Page.Jump("Page3");
end
Thanks but still not working.
Can it be related to the fact I am using the resize example together with it?
Since I've combined both examples, now the resize doesn't work as well.
longedge
04-29-2008, 10:44 AM
I can't say about that but the amended code does work. This is assuming you have at least 3 pages, Page1, Page2 and Page3 and the code is in the on click event of your button and the user has input " password " as the password.
thats correct.
All of the above you wrote is what I have placed.
I shall try to restart from the begining with no other objects on the pages.
Thank you very much for the help.
reteset
04-29-2008, 10:53 AM
what is not worked ..?
Page.Jump( "Page2");
are page names correct ??
because following code seems well
sUser = Input.GetText("Input1");
if sUser == "password" then
Page.Jump("Page2");
else
Page.Jump("Page3");
end
When I click on the button it always go to page3 and never to page2 even if the password is correct
longedge
04-29-2008, 11:26 AM
Is the password the actual word " password " or is it something else? What I mean is are you actually typing that into the input object.
Remember also that AMS is always case sensitive so "Password" and "password" are not the same.
I have attached a sample so please kindly see what am I doing wrong.
Thanks.
ShadowUK
04-29-2008, 12:17 PM
The object is called Input1 but it's actually a RichText Object. I've taken the liberty of redoing your example
PS: Never ever ever upload am7's. Always upload APZ's. You can make these by going to File and Choosing export.
Thank you very much !
It is working briliantlly.
Since it is my first time trying anything I didn't even know there is such an Input object and used a RichText.
Thanks a milion.
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.