How do i prevent the user from entering a RETURN/ENTER key into their username?

Hello,
i am currently trying to make a login system where the
username will obviously enter their username.
I have made my user input box editable and set up variables
to accept the user input and store them into variables, along with
error prevention for blank fields.
However i cannot prevent the user from hitting the
"enter"/"return" key. When i hit "enter" the user input box box
gets larger as the type curser moves onto the next line and when
the username is stored in a variable it is stored as "theuser
RETURN" so when variable is passed to the next frame and is
recalled by another text box to display the username, the user name
has a carriage return.
I want to prevent this, anyone got any suggestions? or know
of any websites i can visit which will explain this to me nicely??
Thank you

suggestion:
don't make the edit field editable right from the start.
rather attach a behaviour to the field/text-sprite like:
property mySprite, myMember
on beginsprite me
Sprite = me.spritenum
-- this is the channel-number of the editbox
myMember = mySprite.member.number
-- this is the field/text-member
member(myMember).editable = FALSE
end beginsprite
on mouseup me
-- when i get clicked for editing, then set me editable
member(mymember).editable = TRUE
the keydownscript = "MyKeyhandler"
-- this sets the keyhandler to YOUR keyhandler, see below
end mouseup
You would then need to have YOUR keyhandler in any mociesript
and there you
would block any unwished key, while editing
on MyKeyhandler
case the key of
RETURN:
stopevent;
otherwise
pass;
end case
end MyKeyhandler
in the end you would attach a behaviour to any
"Submit"-button (this is the
one that "gets" the userinput" and performs further action
according to your
wishes and decisions)
on mouseup
the keydownscript = EMPTY
-- this resets to normal
user-ID = member("Whatever the number or name of your
editfield
is").text
member("Whatever the number or name of your editfield
is").editable
= FALSE
-- any further actions to make in your project
-- to get along with the entered User-ID
end mouseup
something like this, I guess
Peter

Similar Messages

  • I'm using "window.open()" to show one Calendar in a popup window. I can see that the popup is re-sizable. How can I prevent the user from re-sizing the popup?

    I'm using "window.open()" to show one Calendar in a popup window. I can see that the popup is re-sizable. How can I prevent the user from re-sizing the popup? I have tried "resizable=yes|no|1|0" and that seems to be not working.

    You can't prevent users from resizing a pop-up.
    *https://developer.mozilla.org/en-US/docs/Web/API/window.open

  • How can we prevent a user from entering a value in Parameter Field?

    how can we prevent a user from entering a value in Parameter Field and Select-options Field?

    make it invisible, make it inactive, make it display only.
    if the field is not there or not to be seen the user WILL have problems inputting data.
    BUT once the field is there you can NOT prevent that the user fills it with data.
    all you can do is on PAI check if the data the user inputted was good or bad, and clear his inputs, but you can NOT prevent him inputting something.

  • Can we prevent the user from saving the document?

    Hi All,
    I want to know that can we prevent the user from saving  an  illustrator doc till a condition match.
    if we can, then how?
    Please comment.
    Thanks

    You can't prevent it, no. You could continually set the document modified flag to false, which would prevent regular 'Save', but they could always do 'Save As' -- nothing can stop that.

  • How do you prevent the organizer from mixing the order of pictures when down loading off the memory card?

    @How do you prevent the organizer from mixing the order of pictures when down loading off the memory card?

    This sounds like you are using Photoshop Elements, and the Photoshop Elements forum would be best at answering that.
    Photoshop Elements
    Gene

  • Preventing the User from going back to the main page after logging out.

    Hi all,
    In my project I want to prevent the User from going back to the Main page, by clicking the back button of the browser, after the user has loggged out.I had invalidated the session so the user will not be able to do any operations, but he can vew the infos. I want to redirect to the login page if the user tries to go back using the back button after he has logged out.
    I tried the same in this forum after loging out. Surprisingly it is the same. I can browse through all the operations i did even after logging out from here.
    Is it not possible to do that in Servlets?Could somebody help?
    Thanks,
    Zach.

    Hi,
    You can use a servlet filter to do this , as it can interceptany request to your application you can decide to allow user access or not to any page/servlet.
    public class Test implements Filter{
         public void destroy() {
         public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) throws IOException,
                   ServletException {
              System.out.println("filter");
              HttpServletRequest request = (HttpServletRequest) arg0;
              if(!request.getRequestURI().contains("index")){ // set condition that will be checked to verify if the user is logged in
                   System.out.println("redirecting ... ");
                   RequestDispatcher d = arg0.getRequestDispatcher("/index.jsp");
                   d.forward(arg0, arg1);
              arg2.doFilter(arg0, arg1);
         public void init(FilterConfig arg0) throws ServletException {
    }in you web.xml add :
    <filter>
              <filter-name>test</filter-name>
              <filter-class>test.Test</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>test</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>

  • How do you prevent the computer from shutting down when in sleep mode?

    How do you prevent the computer from shutting down when in sleep mode and plugged in?

    Thanks tjk.
    Those are great suggestions and got me looking in places I had not considered before. Unfortunately, the problem remains. The System Preferences did not have the shut down option activated and there are no parental controls active on the computer.
    Any other suggestions are welcome.
    Brian

  • How do I access the music from my Mac drive while booted into Windows?

    How do I access the music from my Mac drive while booted into Windows via Bootcamp? I tried using MacDrive but it's not supported for Vista 64-bit edition. Is there another program out there that I can use? I just want to be able to access my music that's on Leopard while in Vista. Any advice will be much appreciated. Thanks in advance.

    Your best bet is to move the music on the Windows side since Leopard will be able to read and play the music from the mounted Windows drive (Leopard will not be able write anything to the Windows NTFS partition).
    In your case it won't work the other way around.
    Axel F.

  • How to find out the user from the Jobs queue in Report server

    Hello All!
    I have a doubt about finding out the user from the scheduled jobs queue. Say I go ahead and schedule a report on Reports Server how can I find out the user name. When I view the jobs using showjobs I could see that the DBMS_JOBS table has a column under "Job Owner". But it invariantly shows it is "rwuser". So is there a way to find out which user has scheduled which job?
    Regards
    Shobha

    hi,
    The below tables will give only the name .
    USER_ADDRS
    USER_ADDR
    USER_ADDRP
    USR02
    i think you need email address .
    you can use this Tcode : su01d
    and give the user name and excute it
    i hope it will help you.
    Ram
    Edited by: Ram velanati on Jun 30, 2008 6:57 PM

  • How do I take the audio from a video and divide it into separate songs

    How do I take the audio from a video file and divide it into separate audio songs? I then want to export those songs into itunes.

    http://www.bulletsandbones.com/GB/GBFAQ.html#exportsections
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • How do I prevent a user from opening multiple instances on the same computer?

    On the site oldnavyweekly.com there is a .swf that prevents users from opening multiple instances of the site at the same time on the same computer. If you open the site, and try to open it a second time in another window, it won't load. You can't open the site again until the first window is closed. How did they implement this?
    From my analysis it is NOT:
    1. Cookies - The block still takes place if you try opening it in IE and also try opening it in Firefox simultaneously.
    2. Flash Cookies - The block still takes place if I disable flash cookies.
    3. IP Based Block - You are not blocked if you open the site on two separate computers with the same outbound IP address. From my analysis, their server does not assist in the block at all.
    It seems as if their .swf is creating some kind of global system-wide object that can be detected in other instances of the application on the same machine. How did they implement this?
    Thanks!

    you're welcome.
    actually, unless you take an extra step, the first opened swf will close.  if you want the 2nd to close, the initial receiving lc will send a message to sender that causes the sender to close.

  • How to prevent the User from loading more than one seq file?

    Hi,
    I would like to prevent the tester operator from loading more than one test sequence.  Any ideas how to do it?
    Thanks
    Rafi

    Hi Marty,
    Marty_H wrote:
    Hello mhousel,
    Testexec.exe by default loads the sequence files that were last open when it runs.  It is often desired behavior to have multiple sequence files load automatically. 
    [Mark Housel] Maybe for some but certainly not for me. 
    This should be easily handled by TestStand without any problems.  What do you mean by "chaos ensues"? 
    Certainly Teststand doesn't care a bit how many sequences are open.  But, when my sequences open they initialize HW of the ATE associated with
    that sequence file during the sequenceFileLoad callback.  e.g. I allocate TELNET handles to a terminal
    server that connects to multiple console within the system and als for
    the UUT.
    If a second sequence opens it knows nothing about the other sequence and again tries to open a TELENT session to the same port of the
    terminal server and obviously fails, so my sequence reports that it
    can't properly initialize the ATE HW.  Bad juju!
    Are your sequence files set to run automatically when they are loaded?
    I guess so.  Other than the trick of logging in as the special noExecution user and having special code in my sequence and modified Process Model I have no idea how to prevent a sequence fronm "runnin" when opened.
    If you want to prevent Testexec.exe from loading multiple files, you should be able to close out one of the open files when it loads and that sequence file should not load in the future.  I hope that helps.
    The trick I read somewhere else of modifying the Testexec.uir file to never re-load a sequence file automatically seemes to have covered up solved the problem.
    Thanks,
    Mark

  • How can i prevent the result from the user until he does a specific action

    hi again
    1-i have created two textfields for the user to enter two names
    2-i have created a result button when the user hit it a result will appear
    in any case if the user hits the result button the result will appear
    even if he does not enter the two names
    i want to make the result available only if the user enters the two names
    by checking the inputs before the result appear
    if he enteres the names the result appear
    if he does not enter an error message appear?
    how can i do that process?

    lol i think he was talking about formating your messages on the forum.
    look at an example that i just created hope it helps. If not then read up on the GUI chapter of your java book.
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JTextField;
    import java.awt.BorderLayout;
    public class ButtonTest{
        public static void main(String args []){
            JFrame frame = new JFrame();
            JPanel panel = new JPanel();
            final JTextField textA = new JTextField(10);
            final JTextField textB = new JTextField(10);
            JButton button = new JButton("Perform Action");
            class Listener implements ActionListener{
                public void actionPerformed(ActionEvent e){
                    if(!textA.getText().equals("") && !textB.getText().equals("")){
                        System.out.println(textA.getText()+" "+textB.getText());
           ActionListener listener = new Listener();
            button.addActionListener(listener);
            panel.add(textA);
            panel.add(textB);
            panel.add(button);
            frame.getContentPane().add(panel,BorderLayout.SOUTH);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.show();
    }

  • How do I prevent "The user profile service service failed the log on" error messages?

    I work for an organization with approximately 60 staff members across ~80 Windows 7 Professional PCs. Users log in with Active Directory accounts.
    Approximately once per month, a random user will get an error message while attempting to log into their machine that says "The user profile service service failed the log on."  The solution to resolve this issue is here: http://support.microsoft.com/kb/947215?ppud=4&wa=wsignin1.0.
    The problem is that I want to PREVENT this issue from happening, as it is incredibly inconvenient for the user. I had one staff member board a 5-hour plane trip expecting to do work, and once she got in the air she logged in and
    received the error message and was unable to use her computer for the trip. I've had others locked out of their computer with deadlines to get things done, while I am at home off the clock. Editing the registry is not an easy fix, and so it's not something
    I can just post instructions for in a knowledgebase article.
    Does anyone know how to prevent this issue from occurring? I believe that it has something to do with a network-based startup script, or a service trying to connect to our file server, or the computer trying to connect to our ad server. All of these
    are blocked by firewalls (unless the user is off-site), and I suspect that the services may be timing out, causing the user profile service service failed the logon error message, but I can't seem to eliminate it, after nearly a year of trying.
    90% of the time this problem occurs when the user is off-site, but it has happened while the user is in the office too. Once the user gets this error message, the only way to resolve the problem is to log into their computer as a localadministrator account
    and perform the method #1 fix in the knowledgebase article.
    Thanks

    Have you checked the logged files in event viewer around the time when problem occurred?
    Is there any suspicious events like error or warning related to this issue.
    Try run Active Directory Best Practice Analyzer:
    http://technet.microsoft.com/en-us/library/dd759260.aspx

  • How do I stop the user from saving information onto my original?

    Hello everyone,
    I created a form that I plan to put on a website but, I have one problem. The user is allowed to fill-in the form and save the new data onto the original. How can I set up the form so that the user cannot save over the original but, still be able to save a copy and use the "Submit by Email" button? Any help would be appreciated.
    Thank you,

    Use these steps to remove saved (form) data from a drop down list:
    #Click the (empty) input field on the web page to open the drop down list
    #Highlight an entry in the drop down list
    #Press the Delete key (on Mac: Shift+Delete) to remove it.
    *http://kb.mozillazine.org/Deleting_autocomplete_entries
    You can remove saved Password(s) here:
    * Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    *http://kb.mozillazine.org/Password_Manager
    Websites remembering you and automatically log you on is stored in a cookie.<br />
    So you need to remove the cookies from that site to reset this choice.
    *Tools > Options > Privacy > Cookies: "Show Cookies"

Maybe you are looking for

  • Is there any view where I can drag-and-drop an image to another app?

    I'm new to LR3.4.   I'm building books using Luminix PhotoFusion and used to be able to drag-and-drop images directly from PSE5 into Luminix.   With PSE8, that capability was lost and I had to bring up the file properties, go to the containing folder

  • New revision for a metadata only content

    Hi all, I'm using Webcenter Content (UCM) 11.1.1.6 and client is using a kind of documents without file associated. It's working fine with the AllowPrimaryMetaFile=true and createPrimaryMetaFile=1 variables, but client needs to have revisions of this

  • Mac mail auto populates server info and...

    Once I go back and edit the server info, still getting error sending email. Can pull fine, just error when sending. Yes, I have tripple checked all mail settings online and with tech support, they are correct.  iMac is working just fine.  MacBook is

  • Add an interface Method/Event via enhancement??

    Hi expert. I want to pass additional data between two standard webdynpro components. As for as I know, I can use infterface method/event in custom webdynpro component and click check box 'Interface' of method/event. However I can add new method/event

  • Html tag parsing

    I have a jsp page with a form in it. In form there is a text area where user can put html tag and also regular text: such as : testing the tag <b> Hello </b> I want to write a servlet which will get the form's input and make sure that all the html ta