Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Backspace key weird results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kleky
    replied
    Re: Backspace key weird results

    Originally posted by Charles Hoens View Post
    Here is the code as I have followed it's progression...

    Code:
    //========================================
    // Disable Backspace key in IE and Firefox
    //========================================
    // Trap Backspace(8) and Enter(13) - 
    // Except bksp on text/textareas, enter on textarea/submit
    
    document.onkeypress = function(event) {
    if (typeof window.event != 'undefined') { // ie
    event = window.event;
    event.target = event.srcElement; // make ie confirm to standards !!
    }
    var kc=event.keyCode;
    var tt=event.target.type;
    if ((kc == 13) && (event.target.getAttribute('enter_ok') == 'true')) {
    return true; // ok
    }
    
    // alert('kc='+kc+", tt="+tt);
    if ((kc != 8 && kc != 13) || ((tt == 'text' || tt == 'password') && kc != 13) ||
    (tt == 'textarea') || (tt == 'submit' && kc == 13))
    return true;
    alert('Bksp/Enter is not allowed here'); 
    return false;
    }
    
    if (typeof window.event != 'undefined') // ie
    document.onkeydown = document.onkeypress; // Trap bksp in ie. !! Note: does not trap enter, but onkeypress does !!
    Place this in the ClientSide, OnGridRender event. Works great!

    Charlie
    Many many thanks...this works a treat!! problem solved. Surley J.R. has tried this?

    As Charlie said, place in grid client-side OnGridRender, or for Dialogs, client-side OnRenderComplete.

    Leave a comment:


  • kleky
    replied
    Re: Backspace key weird results

    This issue also occurs with dropdowns, so editable text boxes are the least of your concerns.

    Leave a comment:


  • 2ninerniner2
    replied
    Re: Backspace key weird results

    You didn't mention if this was in a Dialog or a Grid, but for me, in a Grid, all I do is set the fields I want as read-only to a Label Control type and adjust the Label Properties > In-line style as required.

    For example, in the screenshot, the Employee Detail > Login is set to:
    Code:
    color: #ffffff; background-color: #008000; border-color: #33cc33; padding-bottom: 2px; padding-left: 5px; padding-right: 100px; padding-top: 2px;
    This is from IE9 on Win 7 ... not dimmed at all


    read-only_field.jpg

    Leave a comment:


  • agillbb
    replied
    Re: Backspace key weird results

    My preferred way is to leave the field editable, but hide it!
    Then use a dummy static field to display the value.
    Use simple js statements to set the field's value - trigger it via a js event or otherwise.
    You are really only using this dummy field's DIV to display your data.
    You can also make it bold and red if you like.

    Leave a comment:


  • J.R. Noe
    replied
    Re: Backspace key weird results

    the field is set up to receive a barcode number, and once entered it must remain unchanged, so i set it to read only once there is a value in it. But it still needs to be able to be seen and referenced and if t is not enabled, it is too dim to be very readable. That is why it is set up that way, but if someone has a better idea then please let me know. Everyone made very good points about not allowing the curser to even enter the field, so i thought i had better explain. Thanks everyone.

    Maybe i should have it setup to pop up a message box saying "the field cannot be edited" and then set the focus to another field once the messagebox is closed.

    Leave a comment:


  • frankbicknell
    replied
    Re: Backspace key weird results

    Originally posted by 2ninerniner2 View Post
    Again, why should a user be able to place their cursor where it's not supposed to do anything? :) IMHO, this is a UI/UX issue; a read-only field should be differentiated from one that is editable. To do otherwise leads to this discussion
    I agree totally.

    The problem I had with IE is that if you disable the field the text is 'dimmed' and is almost unreadable. I found out that that is controlled by the browser and can't be changed. I tried many different ways to solve this issue but nothing really worked. Now I use Firefox and the disabled fields text is not dimmed. I show that it is not an editable field by changing the backcolor. De-selecting the Updatable property works most of the time but allows users to see lists from lookups.

    Leave a comment:


  • Charles Hoens
    replied
    Re: Backspace key weird results

    Yes, Neo, we are in the Matrix!

    Leave a comment:


  • 2ninerniner2
    replied
    Re: Backspace key weird results

    Again, why should a user be able to place their cursor where it's not supposed to do anything? :) IMHO, this is a UI/UX issue; a read-only field should be differentiated from one that is editable. To do otherwise leads to this discussion

    Leave a comment:


  • Charles Hoens
    replied
    Re: Backspace key weird results

    Just because a field is read only doesn't mean that a user can't put their cursor there and then try and "back-up". That's what my users were doing and what took them out of the page.

    Leave a comment:


  • 2ninerniner2
    replied
    Re: Backspace key weird results

    Just out of curiosity, how is it that a read-only field is able to be entered?

    If it is read-only, then why have it "enter-able"? As a user, this behavior would confuse me.

    Leave a comment:


  • Charles Hoens
    replied
    Re: Backspace key weird results

    Here is the code as I have followed it's progression...

    Code:
    //========================================
    // Disable Backspace key in IE and Firefox
    //========================================
    // Trap Backspace(8) and Enter(13) - 
    // Except bksp on text/textareas, enter on textarea/submit
    
    document.onkeypress = function(event) {
    if (typeof window.event != 'undefined') { // ie
    event = window.event;
    event.target = event.srcElement; // make ie confirm to standards !!
    }
    var kc=event.keyCode;
    var tt=event.target.type;
    if ((kc == 13) && (event.target.getAttribute('enter_ok') == 'true')) {
    return true; // ok
    }
    
    // alert('kc='+kc+", tt="+tt);
    if ((kc != 8 && kc != 13) || ((tt == 'text' || tt == 'password') && kc != 13) ||
    (tt == 'textarea') || (tt == 'submit' && kc == 13))
    return true;
    alert('Bksp/Enter is not allowed here'); 
    return false;
    }
    
    if (typeof window.event != 'undefined') // ie
    document.onkeydown = document.onkeypress; // Trap bksp in ie. !! Note: does not trap enter, but onkeypress does !!
    Place this in the ClientSide, OnGridRender event. Works great!

    Charlie
    Last edited by Charles Hoens; 10-19-2012, 03:16 PM.

    Leave a comment:


  • agillbb
    replied
    Re: Backspace key weird results

    Yea, apparently its a common problem.
    http://mspeight.blogspot.com/2007/05...in-ie-and.html

    Leave a comment:


  • kkfin
    replied
    Re: Backspace key weird results

    Backspace is Back and Shift + Backspace is Forward

    Here is a list of shortcuts I have bookmarked (old but still valid )

    Leave a comment:


  • J.R. Noe
    replied
    Re: Backspace key weird results

    Thanks Jeff, it may be normal, but it is not desireable in a web based application. I get complaints on it on a regular basis, and i agree with the complaints, it should not do that. Filling out a form in my application, it is just habit to hit the backspace key, which then kicks you off the page, causing much frustration. capturing the backspace key would seem to work, but i think it will just cause problems for data entry.
    i have checked other web based applications and the backspace key works as needed, so i know it can be done.

    Leave a comment:


  • marvinbase
    replied
    Re: Backspace key weird results

    Isn't this just normal browser behavior? From here, go to almost any other web page and click anywhere that isn't a form field. When I press backspace, it takes me back to the prior page in IE. (Note- doesn't work with google.com but does with news.google.com- perhaps they capture the backspace keystroke in javascript??)

    Leave a comment:

Working...
X