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

Home Posts Topics Members FAQ

problem with Button behaviour

Hi

I have different images which i use to simulate a button behaviour.
This looks as follows:

if (document.image s)
{
toc1over = new Image(31,54);
toc1over.src = "b go focus.bmp";
toc1down= new Image(31,54);
toc1down.src= "b go down.bmp";
}

function rollPress(imNam e,down) {
if (down) { document.images[imName].src = toc1down.src }
else { document.images[imName].src = toc1over.src }
}
<img src="b go focus.bmp" class="setact_b utton" name="toc1"
onMouseDown = "rollPress('toc 1',true)"
onMouseOut = "rollPress('toc 1',false)"
onMouseUp = "rollPress('toc 1',false)"
onclick="javasc ript:alert('tes t');">

It works quite fine, but there is a small "problem". Lets say I move
over the button and the i press the mouse button and hold it. As
required the onmousedown event is triggered. If i continue to told the
mouse button down and I move out of the range of the button the
onmouseout event is NOT triggered. Can anybody tell me how the
onmouseout event is triggered although the mouse button is pressed?
Would be very thankful for that!

Best Regards
Christoph

Sep 15 '05 #1
1 1296
ASM
Christoph wrote:
<img src="b go focus.bmp" class="setact_b utton" name="toc1"
onMouseDown = "rollPress('toc 1',true)"
onMouseOut = "rollPress('toc 1',false)"
onMouseUp = "rollPress('toc 1',false)"
onclick="javasc ript:alert('tes t');">

It works quite fine, but there is a small "problem". Lets say I move
over the button and the i press the mouse button and hold it. As
required the onmousedown event is triggered. If i continue to told the
mouse button down and I move out of the range of the button the
onmouseout event is NOT triggered.
of course ! if you forget to leave the mouse !

mouseover and mouseout fires while flying over limits
during your mousedown the browser doesn't look to mousemoving (mouseout)

usually : onmousedown+onm ouseup
don't like to work with onclick ... which is same
Can anybody tell me how the
onmouseout event is triggered although the mouse button is pressed?


what does a mousedown ? certainly not a mouseout ...

--
Stephane Moriaux et son [moins] vieux Mac
Sep 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3035
by: Alastair Anderson | last post by:
I have created a very simple form with which I would like to update a single value in a single row of a database as a proof of concept. The relevant parts of the form are a DBWebTextBox (which is hooked into a column ORGANISATION.SHORT_NAME) and a Button which I am using as a submit button.
2
1688
by: SenthilVel | last post by:
Hi i have radio buttons in my Page and i am able to see some starnge behaviour with those. 1st : DSN 2nd radio button: MSDE the above 2 are in collection.
7
1225
by: Morten | last post by:
Hi! I have a problem that's driving me nuts: I have a webform with a user control containing a number of buttons at the top. On my form I have a search button that I want to be the default button - so that if you type something into one of the fields on my form and hit <Return> this button is activated. I have made sure that the...
6
1428
by: ?scar Martins | last post by:
Hi When I'm debugging and somewhere in the code I have a breakpoint, many times when the code after breakpoint finishes and the app returns I can do nothing within in it(it's like freeze)... The app behaves strangely and not accepts any event even close event!!!!! It just lefts for me to stop debugging clicking the respective button in the...
0
2344
by: Stewart Midwinter | last post by:
I have a Tkinter app running on cygwin. It includes a Test menu item that does nothing more than fetch a directory listing and display it in a Toplevel window (I'd use a tkMessageBox showinfo widget, but for some reason the text is invisible on cygwin). After I close the Toplevel widget, all of the menus in my app behave as though they...
3
1572
by: Veerle | last post by:
I have the following html: <table cellpadding="0" cellspacing="0" width="850"> <tr> <td> <div id="messagebox"> <div class="Dialog"> <div class="DialogHeader">Fouten</div> <div class="DialogBody"> ...
3
2169
by: Grumman | last post by:
For various reasons, I've found myself in the position of needing to automate the operation of a small VB6 application from an external process. After a bit of searching, I found watsup, and it has fit the bill nicely, except for one problem. Roughly, I have a script that fills in a field, sets a combobox, then clicks a button via...
0
728
by: sachindotnet | last post by:
Hi, I have got some problems while trying to create web application using VS,NET 2005.Whenever i create a website using the "FILE" -> "NEW" -> "WEBSITE" option in vs.net 2005 and try running it, the web page does not the give the desired behaviour on the first load. When i manually do a refresh using the refresh button the page gives the...
0
967
by: zektor | last post by:
Hi there, I have an application that have 1 backgroundworker doing operation in hw through rs232 (like a pooling constantly). In my UI thread I have do operations also on that resource (rs232 resource). The problem: When I click a button to send data over th rs232 and the worker is doing Some operation (backWorker.IsBusy == true) I send a...
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
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
6621
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
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...
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.