Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7732953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:51:41+00:00 2026-06-01T06:51:41+00:00

I’ve got a screen that allows users to add & remove rows which they’ll

  • 0

I’ve got a screen that allows users to add & remove rows which they’ll use to input their scores. The input rows gets created based on sample type selected & a pre-configured “template” (eg, going by my picture… I select hearts, and “germs, wholebird” & “Pseudomonas, Crubming” gets added as a default), but they can also append or remove rows as they see fit.

I’d like it so that when a user tabs, it’ll only tab through the textboxes, and not the dropdown boxes.

enter image description here

The code

Index

    @Html.ActionLink("New Row...", "AddRow", null, new { id = "addItem" })
        <div id="overflw" style="height: 260px; width: 885px; overflow: auto; border: 1px solid black">
            <div id="editorRows">
                @if (Model.Micros != null)
                {
                    foreach (var item in Model.Micros)
                    {
                        Html.RenderPartial("MicroRow", item);
                    }
                }
            </div>
        </div>
   <script type="text/javascript">
        $(".deleteRow").button({ icons: { primary: "ui-icon-trash" },
            text: false
        });          
    </script>

MicroRow

    <div class="editorRow" style="padding-left: 5px">

    @using (Html.BeginCollectionItem("micros"))
    {  
        ViewData["MicroRow_UniqueID"] = Html.GenerateUniqueID();

        @Html.EditorFor(model => model.Lab_T_ID, new { UniqueID = ViewData["MicroRow_UniqueID"] })
        @Html.EditorFor(model => model.Lab_SD_ID, new { UniqueID = ViewData["MicroRow_UniqueID"] })      
        @Html.TextBoxFor(model => model.Result)
        <input type="button" class="deleteRow" title="Delete" value="Delete" />
    }
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:51:42+00:00Added an answer on June 1, 2026 at 6:51 am

    Well, the simplest way I can think of is to hijack your tab key whenever you are within one of your text boxes. I’ve put up a fiddle here which might give a general idea as to what I meant.

    <input type='text' id='n1' data-key='1' />
    <input type='text' id='n2' data-key='2' />
    <input type='text' id='n5' value = 'Tab skips me'/>
    <input type='text' id='n3' data-key='3' />
    <input type='text' id='n4' data-key='4' />
    
    $(function(){
        $('input[type="text"]').keydown(function(e){
            if(e.which === 9){
                e.preventDefault();
                var self = $(this), 
                    myIndex = parseInt(self.data('key'),10),
                    nextIndex = myIndex + 1,
                    nextElement = $('input[data-key="'+ nextIndex +'"]');
                nextElement.focus();
            }
        });
    });​
    

    ​

    Edit – Using TabIndexes

    While the piece of code above works as advertised, you may also want to check out using tabindex. I will admit, this is something that I did not know existed. But after reading through comments, decided this was something that may be more suited to your requirement. I’ve updated a fiddle to show how it works. Check it out

    <input type='text' id='n1' tabindex='1' value="I'm first" />
    <input type='text' id='n2' tabindex='3' value="I'm third" />
    <input type='text' id='n5' value="I'm last"/>
    <input type='text' id='n3' tabindex='2' value="I'm second" />
    <input type='text' id='n4' tabindex='4' value="I'm fourth" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.