Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 27th, 2004, 02:15 PM
Friend of Wrox
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default z-index and focus

let the case of two <DIV>s super-imposed on each other.
u know that of both, whose z-index is lower, will get the focus like mouseover, mouseout etc.

but i want just that, <DIV> that has lower z-index, that is covered by <DIV> of higher z-index, should get the focus.

is this possible in JavaScript ?
PHP, SEO | anshul shrivastava | mediasworks.org | FB
Reply With Quote
  #2 (permalink)  
Old July 28th, 2004, 08:08 AM
Friend of Wrox
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post

Hi Anshul,

I don't think this is possible, altough you could create a transparent div (the same size & position as the bottom div) above the top div & handle the events there, something like...

        <title>Test Full Width</title>
        <style type="text/css">
        #Upper, #Lower, #Transparent{
            position: absolute;
            width: 100px;
            height: 100px;
            left: 50px;
            top: 50px;
            z-index: 100;
            background-color: darkblue;
        #Lower, #Transparent{
            left: 20px;
            top: 20px;
            z-index: 50;
            background-color: lightblue;
            z-index: 100;

        <div id="Upper" onclick="alert('Upper clicked');"></div>
        <div id="Lower"></div>
        <div id="Transparent" onclick="alert('Transparent clicked');"></div>


Reply With Quote
  #3 (permalink)  
Old July 29th, 2004, 02:31 AM
Friend of Wrox
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul

thank u4ur idea, ChrisScott. i'll c if it can fulfil me. thanx
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Focus dhoward Javascript 3 September 19th, 2007 02:54 AM
Focus dhoward VB.NET 2002/2003 Basics 0 September 13th, 2007 02:23 PM
focus kvanchi General .NET 2 December 13th, 2004 09:16 PM
Focus jbenson001 ASP.NET 1.x and 2.0 Application Design 2 February 18th, 2004 02:14 PM

All times are GMT -4. The time now is 05:26 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.