• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 630
  • Last Modified:

Auto tab works on one computer but not on another

I'm using JQuery auto-tab with this JQuery library

<script language="javascript" type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script>


On my machine, the auto tab works. I'm using IE 9. Works in firefox as well. Another worker has the same IE and the autotab doesnt work for her. Works for some users, doesnt work for others. How can I debug this? someone said to use 1.7.1 version of JQuery but the entire site then needs to be retested and we're close to going Live.

Any ideas?

This is the code just in case i need to change something here:

<script type="text/javascript">
    jQuery.fn.autotabindex = function () {
        var keypressed = null;
        jQuery(this).click(function () {
            $(this).select();
        });
        jQuery(this).keyup(function (e) {
            if (window.event) keycode = window.event.keyCode;
            else if (e) keycode = e.which;
            keypressed = keycode;
            switch (keypressed) {
                // ignore the following keys     
                case 9: // tab
                    return false;
                case 16: // shift
                    return false;
                case 20: // capslock
                    return false;
                default: // any other keyup actions will trigger
                    var maxlength = jQuery(this).attr('maxlength'); // get maxlength value
                    var inputlength = jQuery(this).val().length; // get the length of the text
                    if (inputlength >= maxlength) { // if the text is equal of more than the max length
                        next = parseInt($(this).attr("tabindex")) + 1;
                        end = next + 5;
                        for (next; next < end; next++) {

                            if ($("[tabindex='" + next + "']").is(':visible')) {
                                $("[tabindex='" + next + "']").select();
                                $("[tabindex='" + next + "']").focus();
                                break
                            }
                        }
                    }
            }
        });
    }
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $('.autotabindex').autotabindex();
    });
</script>

Open in new window

0
Camillia
Asked:
Camillia
  • 5
  • 4
1 Solution
 
Julian HansenCommented:
Are there any errors that display on the browsers that fail (IE bottom left yellow triangle) Firefox - install firebug?

Do you have a link we can look at?

I would test with 1.7 or 1.8 of JQuery - just to see if that resolves the problem - if it does it will give you some idea of where to look for the problem - you can always switch back to 1.5 again.

The code posted does not really tell us anything because you say it does work across all browsers in some cases.

What is different about the ones where it is failing?

Do you have a test matrix (browser / Version / result / location of user - are they all on the same network - might be a proxy / firewall blocking the script being downloaded)?

Have you looked at the browsers that don't work and ensure that scripting is allowed and other settings that might prevent the code from working?

The more info you provide the easier it will be to assist you.
0
 
CamilliaAuthor Commented:
>> Have you looked at the browsers that don't work and ensure that scripting is allowed
where do I check this?
0
 
Julian HansenCommented:
Did you find an answer to your last question?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
CamilliaAuthor Commented:
I didn't sorry. I will google for it. If you know, please let me know.
0
 
CamilliaAuthor Commented:
thanks, let me try
0
 
CamilliaAuthor Commented:
hmmm..it was on ..the javascript stuff...but still no autotab. Maybe i need to try 1.7 version
0
 
Julian HansenCommented:
What version of browser is causing problems?
0
 
CamilliaAuthor Commented:
Never mind, the user forgot to restart IE. It works now. Thanks for your help.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now