473,513 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"onmousedown/up" events deactivated by dynamic button

127 New Member
Hi all,

I have some onmousedown and onmouseup events that dynamically insert buttons (and input text fields) into a table. However, when I click on one of the buttons (or enter text into one of the boxes) the onmouseup and onmousedown events are no longer responsive.

Any ideas on what happening?

Thanks!
Apr 24 '09 #1
5 2068
acoder
16,027 Recognized Expert Moderator MVP
Without code, it's only a guess.
Apr 24 '09 #2
phub11
127 New Member
Follow-up:

I think I understand the problem... the Javascript is confused between an "onmouseup" (which is done on blank cells in a table) and button clicks (which are done within the same table but in populated cells).

Is there any way I can distinguish between the two events?

Thanks!
Apr 24 '09 #3
acoder
16,027 Recognized Expert Moderator MVP
Perhaps this will help. If not, post your code.
Apr 24 '09 #4
phub11
127 New Member
Thanks for the post. I managed to get round it by having events tied to specific tables...

Expand|Select|Wrap|Line Numbers
  1. window.onload = function() {
  2. //monitor mouseclicks over "mytable"
  3.     document.getElementById("mytable").onmousedown = mouseDownHandler
  4.     document.getElementById("mytable").onmouseup   = mouseUpHandler
  5.     document.getElementById("mytable").ondblclick = temprun
  6.  
Apr 27 '09 #5
Dormilich
8,658 Recognized Expert Moderator Expert
this will get it a little bit faster
Expand|Select|Wrap|Line Numbers
  1. window.onload = function() {
  2.     var table = document.getElementById("mytable");
  3.     table.onmousedown = mouseDownHandler
  4.     table.onmouseup   = mouseUpHandler
  5.     table.ondblclick = temprun
  6. }
Apr 27 '09 #6

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

Similar topics

3
17290
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
4
2316
by: Larry R Harrison Jr | last post by:
I have them working now, courtesy of the link given in the prior thread--the HVMenu over at Dynamic Drive myself. http://www.dynamicdrive.com I have them working as side-bar menus, not...
3
5583
by: Robert Oschler | last post by:
I have an IFrame on my web pages that displays useful tips. I have a button next to it that hides and shows it by triggering a Javascript call. I know how to make the iframe invisible by changing...
2
5442
by: Alienz | last post by:
Lets say I have a form called Planet_Systems and a form called Species. I then want to link the primary key "Planet" to bring up it's various species in the corresponding subform. So, I created a...
1
2191
by: David | last post by:
I would like to pop up a small window that tells the user to "please wait" while the server completes a long task (eg. completes an order) and then once the server is done, close the pop-up and...
2
2339
by: JohnR | last post by:
Hi all. In my program I try to handle all obvious potential errors with structured error handling (try-catch) block. What I would like to do is have an 'overall' error handler that would...
5
2595
by: dpomt | last post by:
When the ASP.NET menu is rendered on downlevel browers, the text "^ up one level" is displayed. Any ideas how I can change that text? I did not find a property for the menu control where I can...
10
3563
by: JHNielson | last post by:
I am designing an interface, and I would like to customize the buttons instead of using the plain gray boxes that are standard in Access. Is there a way to set for the "On Mouse Up" and "On...
1
1524
by: kimiraikkonen | last post by:
Hi, i have 2 forms, first form has a button that brings user to toggle second form, and second form contains a integrated web-browser component which has a auto-start flash (the flash contains...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.