Results 1 to 7 of 7

Thread: Problem in function of enter key

  1. #1
    Join Date
    Jul 2010
    Posts
    228
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Default Problem in function of enter key

    Good day!

    I got problem in my function on enter key.. I attached my files and code for better understanding of my problem..

    Thank you in advance

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    If it's a problem with that sort of thing, you want the JavaScript section.

  3. #3
    Join Date
    Jul 2010
    Posts
    228
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Default

    I think so....


    Thank you...

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    you might want to add an introduction/summary of your problem. People are more likely to look into helping with your problem if they have a decent idea of what your problem is.

  5. The Following User Says Thank You to traq For This Useful Post:

    rhodarose (02-23-2011)

  6. #5
    Join Date
    Jul 2010
    Posts
    228
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Default

    Here is the summary of my problem...

    I used function on enter key for moving on the next texbox and it works from the plt date textbox up to lot/batch # but when I press enter key instead of the cursor goes to time in textbox ti goes to save button. Save button should be hit after shift textbox.


    Thank you

  7. #6
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    Wouldn't using "tab order" be a better idea for this

  8. #7
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    that's what I was thinking. but, in any case, in your code I can track your order up to #bom0 - i.e., there's a handleEnter call that looks for #bom0, but I don't see any element with that name in the markup. Are you trying to get to the first #bom? I'm not sure how you'd define that in the script. You'd probably have to add an "array index" argument to the function, but you'll have to get some javascript help for that.

    However, as fastol mentions, you could skip the mess altogether by using the tabindex attribute. it would require using [tab] instead of [enter] to navigate (perfectly acceptable, IMHO), or, you could try something like this:
    Code:
        function EnterToTab(e)
            {
            if(e.keyCode === 13)
                {
                e.keyCode=9; return e.keyCode;
                } 
            }
    (Completely untested, I haven't looked into this at all. just a possible solution: when the user presses [enter], return the [tab] keycode instead.)

    Edit:

    Actually, it looks like there's quite a bit more to it than that

    Last edited by traq; 02-23-2011 at 08:33 PM.

  9. The Following User Says Thank You to traq For This Useful Post:

    rhodarose (02-24-2011)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •