473,385 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Sending a click event to the bottom layer

I have two layer one is on top, and bottom.
I want to click the bottom layer.
Does we can do that in javascript?

mickey
Sep 18 '07 #1
8 1713
pbmods
5,821 Expert 4TB
Heya Mickey. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).
Sep 18 '07 #2
acoder
16,027 Expert Mod 8TB
Can you show some code?
Sep 18 '07 #3
Heya Mickey. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

Thanks, pbmods!

Mickey
Sep 20 '07 #4
Can you show some code?
the following are my codes:

[HTML]<div id='dtop' style='position:absolute;top:0px;' onclick="javascript:alert('hello');">
<img src='top.jpg' id='imgtop' name='imgtop'/>
</div>

<div id='dbottom' style='position:absolute;top:0px;' onclick="javascript:alert('hello bottom');">

<img src='bottom.jpg' id='imgbottom' name='imgbottom'/>

</div>
[/HTML]
I can not click on second <div>.
If I want to click on second <div>, what should I do?

Mickey,
Sep 20 '07 #5
dmjpro
2,476 2GB
the following are my codes:

Expand|Select|Wrap|Line Numbers
  1. <div id='dtop' style='position:absolute;top:0px;' onclick="javascript:alert('hello');">
  2.       <img src='top.jpg' id='imgtop' name='imgtop'/>
  3. </div>
  4.  
  5. <div id='dbottom' style='position:absolute;top:0px;' onclick="javascript:alert('hello bottom');">
  6.  
  7.      <img src='bottom.jpg' id='imgbottom' name='imgbottom'/>
  8.  
  9. </div>
  10.  
I can not click on second <div>.
If I want to click on second <div>, what should I do?

Mickey,
Ok!
Try this.

Expand|Select|Wrap|Line Numbers
  1. document.getElementById('dbottom').click();
  2.  
Kind regards,
Dmjpro.
Sep 20 '07 #6
acoder
16,027 Expert Mod 8TB
Use code tags when posting code, e.g.
[CODE=html]
HTML code goes here
[/code]

[CODE=javascript]
JavaScript code goes here
[/code]
Sep 20 '07 #7
Ok!
Try this.

Expand|Select|Wrap|Line Numbers
  1. document.getElementById('dbottom').click();
  2.  
Kind regards,
Dmjpro.
My problem is when I try to create a Roulette by using javascript.
Roulette, there are alot of numbers on table, and it allows player to bet on line as well that is the problem.

So when I place a chip on a number nearby a betting line then I can never click on that line anymore because the chip is over the betting line.
(chip and line I use DIV to show the image).

Is it possible in javascript that I still click on that line(div) although chip( another div) is over it?


Regards,
Mickey
Sep 24 '07 #8
pbmods
5,821 Expert 4TB
Heya, Mickey.

Presumably, you want the User to be able to remove chips as well, perhaps by clicking on the chips themselves.

My recommendation would be to redesign either your 'table' or your chip graphic so that both are visible.

Alternatively, you could create a pop-up that appears when the User clicks on the chips that gives the User the option of removing or increasing his bet.
Sep 24 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Jim Mitchell | last post by:
Am I correct to assume that any changes to a control's properties or changes to a ViewState("Name") are not available until after the Page_Load fires? If so, how can you set a flag in a control...
1
by: Zaidan | last post by:
I am running Excel2000 under WIN98 2nd edition, and I am writing a VBA code (I will consider using javascript if I have to) that does the following, at the user command: 1- Start MS Explorer and...
18
by: nutso fasst | last post by:
Hello. Is there a way to make an element 'transparent' to mouse activity, such that mouse events go to the underlying element? I have an absolutely-positioned image element with transparency...
7
by: Paul Cooper | last post by:
Dear All, I am working on a piece of Javascript code that needs to detect a mouse-click, shift-click and control-click. The code is not my own - it is a part of a much larger suite of routines....
6
by: Sally | last post by:
I need to be able to click in a subform and run code but at the same time I need to be able to scroll the records without running the code. I tried coding the Enter event of the subform control but...
7
by: Jeff Casbeer | last post by:
New to VB.. What is the VB syntax for posting a Windows event? For example, to have an event fire AFTER a form loads, I'd add a posted call to a "post_load" event, from "load". What is the VB...
5
by: Nick | last post by:
Hey guys, I have 2 events on a windows forms datagrid, the mouse move as well as the double click events. What's happening is that when I double click on a row in the grid, the mouse move event...
0
by: William Main | last post by:
I have the following code ImageMap image1 = new ImageMap(); image1.Click += new ImageMapEventHandler(ImageMap_Click); image1.HotSpotMode = HotSpotMode.PostBack; image1.ImageUrl =...
1
by: mazdotnet | last post by:
Hi all, I'm really stuck trying to figure the following out. I have been working on a shopping portal where you can select products from a list inside a repeater on the bottom of the page and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.