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

  • SEARCH
  • Home
  • 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 9084993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:08:16+00:00 2026-06-16T21:08:16+00:00

I have created a dialog box that appears when you click on an element

  • 0

I have created a dialog box that appears when you click on an element on the page. The div box then appears with a huge box shadow to prevent the user from accessing the underlying (orginal) elements on the page. Except its doesnt, the user can still tab through the items under the .overlayme div

I have scaled my code down and writen this little example to demonstrate what i mean.
If you click on the first button and tab through the rest, when actually what i am trying to achieve is preveent the user from clicking on the first button and only being able to tab on the “eventually you”, “will get here” buttons.

My mark up is here

<html><head></head><body><input type="button" value="click me first" />
&nbsp;
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
<br/>&nbsp;<br/>
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
<br/>&nbsp;<br/>
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
<br/>&nbsp;<br/>
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />
&nbsp;
<input type="button" value="now tab to me" />   
<div class="overlayme">
<br/>&nbsp;<br/>
<input type="button" value="eventually you" />
&nbsp;
<input type="button" value="will get here" /></div></body></html>​​​​

and my css is here

.overlayme input{ background-color:lightgrey; }
.overlayme {
max-width: 250px;
margin: 0 auto;
margin: 20px;
padding: 20px;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 10000px rgba(0, 0, 0, 0.3);
position: relative;
background: white;}
input{
background-color:white;}

So basically in short .. The problem is that i can still access the underlying elements and i want them to be disabled and only be able to access the items on the .overlayme div.

Is it possible to disable this lower level with css or does this have to be a js thing?
Example here: http://jsfiddle.net/8BPMk/1/

  • 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-16T21:08:17+00:00Added an answer on June 16, 2026 at 9:08 pm

    Use this:
    http://jsfiddle.net/gQEUx/

    you need to add fixer div with absolute positioning and 100% width and heigth

    .fixer {
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        position: absolute;
    }
    

    and

    <div class="fixer">
      <div class="overlayme">
        <br/>&nbsp;<br/>
        <input type="button" value="eventually you" />
        &nbsp;
        <input type="button" value="will get here" />
      </div>
    </div>
    

    and this fiddle – http://jsfiddle.net/gQEUx/1/, thanks to @AbstractChaos

    $('.fixer').hide();
    
    $('#example').click(function() {
      $('.fixer').toggle('slow');
      if($('.fixer').is(':visible')) {
        $('input').attr('tabIndex','-1');    
      }
      else {
          $('input').attr('tabIndex','1');
      }
    });
    

    so from this – http://www.w3.org/TR/html401/interact/forms.html#tabbing-navigation

    and this – http://nemisj.com/focusable/

    and this – http://msdn.microsoft.com/en-us/library/ie/ms534654%28v=vs.85%29.aspx

    elements that can be tabindexed are:

    msdn:

    The following elements can have focus and are tab stops by default: a, BODY, button, frame, iframe, img, input, isIndex, object, select, textArea.
    
    The following elements can have focus by default but are not tab stops. These elements can be set as tab stops by setting the tabIndex property to a positive integer. applet, div, frameSet, span, table, td.
    

    w3c:

    The following elements support the tabindex attribute: A, AREA, BUTTON, INPUT, OBJECT, SELECT, and TEXTAREA.
    

    and i haven’t read third article, think that would be enough already

    EDIT: should do the job – http://jsfiddle.net/gQEUx/3/

    $('.fixer').hide();
    
    $('#example').click(function() {
        $('.fixer').toggle('slow');
        if($('.fixer').is(':visible')) {
          $('a, AREA, BODY, button, frame, iframe, img, input, isIndex, object, select, textArea, applet, div, frameSet, span, table, td')
          .attr('tabIndex','-1');    
        }
        else {
          $('a, AREA, BODY, button, frame, iframe, img, input, isIndex, object, select, textArea, applet, div, frameSet, span, table, td')
          .attr('tabIndex','1');
        }
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have dialog created like this $('#add_error').click(function(e) { $('<div>') .load('/someaction/format/html/') .dialog({ title: 'Some title',
I have created an Alert dialog box in my J2ME app to alert user
I have a dialog box that has settings associated with it. When the user
I have created a dialog box in my MFC app as below: BackfaceControlPoints *controlpoints
In my application, I have created a dialog box to accept password. In the
I have a dialog box, created with the code javascript and HTML generated below.
I have created a dialog and got a problem that only part of the
I have created a Dialog with two buttons Yes, No, and then I have
I have successfully created a feature in sharepoint that modifies the existing edit dialog
I have a modal dialog that is created with the following: procedure TFormCompose.createParams(var Params:

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.