473,587 Members | 2,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"onmousedow n/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 2077
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
17296
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 seems to be ignored completely, even when I try with window.setTimeout. So my two questions are: (1) Most important: Is there anything I can do...
4
2326
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 horizontal ones on TOP of the page. I figured it out and have it working fine, except for one thing--apparently I need to insert the code for the menu...
3
5599
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 it's "visibility" property, and I know how to change it's size using the style "height" property. The problem is, with both of those techniques...
2
5451
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 subform species within the forum Planet_Systems. They're linked properly and related etc.. I typed into the Planet combobox: "Earth". I would now...
1
2197
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 redirect to a results page. I understand that it's a combination of server-side redirects and java, but I can't quite understand the order of...
2
2354
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 gracefully catch any unanticipated errors. I created a startup module to place my overall error handling for my "real" program which is Form1. My...
5
2605
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 change it. Dieter
10
3585
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 Mouse Down" events for the control to display two different pictures? I have two pictures: Button-UP.jpg and Button-Down.jpg. Can is set Access to...
1
1530
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 audio) file. The problem is: When i run the program, the next form which contains sound-containing flash file inside its browser, launches file...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8206
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5392
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
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 we have to send another system

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.