473,327 Members | 2,118 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,327 software developers and data experts.

problem with Button behaviour

Hi

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

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

function rollPress(imName,down) {
if (down) { document.images[imName].src = toc1down.src }
else { document.images[imName].src = toc1over.src }
}
<img src="b go focus.bmp" class="setact_button" name="toc1"
onMouseDown = "rollPress('toc1',true)"
onMouseOut = "rollPress('toc1',false)"
onMouseUp = "rollPress('toc1',false)"
onclick="javascript:alert('test');">

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 1273
ASM
Christoph wrote:
<img src="b go focus.bmp" class="setact_button" name="toc1"
onMouseDown = "rollPress('toc1',true)"
onMouseOut = "rollPress('toc1',false)"
onMouseUp = "rollPress('toc1',false)"
onclick="javascript:alert('test');">

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+onmouseup
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
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...
2
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
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...
6
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...
0
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...
3
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...
3
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...
0
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,...
0
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.