473,385 Members | 1,341 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.

dynamic mouse over action

Hello and thanks for reading my posting.
My question is ......
Is it possible to change the mouseover action ? so if we have an image
thus

<IMG id="splot" onmouseover= "window.status ='forward'; return false;"
Title=forward onmouseout ="window.status=''; return false;"
src="Images/Navigate.gif" >

and I have a javascript function ...........

<script language=javascript>
function DoIT(){
alert(document.getElementById("splot").title);
document.getElementById("splot").title = "back";
return false;
}
</script>

I can change the title to say "back" but how do I change the mouseover
action to change the status text to say back ?

The more I think about this the more I think this is a little nasty
but if someone has any insight I'd love to hear it !
once again many thanks
simon.
Jul 20 '05 #1
1 9738
On 03.7.15 5:35 PM, simon taylor wrote:
Is it possible to change the mouseover action ? so if we have an image
thus

<IMG id="splot" onmouseover= "window.status ='forward'; return false;"
Title=forward onmouseout ="window.status=''; return false;"
src="Images/Navigate.gif" >

and I have a javascript function ...........

<script language=javascript>
function DoIT(){
alert(document.getElementById("splot").title);
document.getElementById("splot").title = "back";
return false;
}
</script>

I can change the title to say "back" but how do I change the mouseover
action to change the status text to say back ?


You could use a global variable like this:

<script language=javascript>
var statustext = "forward";
^^^^^^^^^^^^^^^^^^^^^^^^^^^
function DoIT(){
alert(document.getElementById("splot").title);
document.getElementById("splot").title = "back";
statustext = "back";
^^^^^^^^^^^^^^^^^^^^
return false;
}
</script>

And then use this variable in the mouseover script:

<IMG id="splot" onmouseover= "window.status = statustext; return false;"

I assume you'll have to change the status text value back again somewhere.

Phil

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 20 '05 #2

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

Similar topics

5
by: John Champaign | last post by:
Hi all, I'm working on an educational applet for a child with special needs. He's got a bit of a trick to make my life more difficult... To interact with the applet he needs to click on...
0
by: Martin | last post by:
Hi. I had a very frustrating afternoon and evening but I have got it all under control now so all of a sudden I am in a good mood. I want to share some insights on output caching with you lot. ...
1
by: tribal boy | last post by:
Guys, I am using a dynamic menu which uses xml,xsl a css file and javascript. This works fine when there are no server controls around or underneath it. The problem is whenever the menu...
3
by: Per Larsson | last post by:
Hi! I've developed an application, and I want to use a semi opac form to show the help. The idea is to show the transparent help form on top (TopMost = True)and still be able to work with the...
1
by: scott_gui | last post by:
Creating a Windows application: <Double-Button-1> mouse event has a conflict when there is also a binding to the <Button-1> event. It seems like a silly oversight that performing a double click...
2
by: scott_gui | last post by:
I am creating a Windows application: The mouse event <Double-Button-1> has a conflict when the <Button-1> event also has a binding. Double clicks will first perform the single click action. This...
5
by: drdave | last post by:
Hi, I have 6 forms being generated using coldFusion, they are named special1, special2 special3 and so on.. in these forms I have a link to open a new window. I am trying to pickup the...
3
by: Ryan Liu | last post by:
Can someone give a sample to prevent a row from being deleted in a datatable? I tried e.Row.RejectChanges(); in dt_RowDeleting() but seems does not work. I need verify if there other data...
2
by: Roberto Reale | last post by:
While developing a drag&drop enabled application I found out this "strange" behaviour: if I put a message box into the QueryContinueDrag event handler the message box is shown but the mouse cursor...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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.