473,386 Members | 1,715 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,386 software developers and data experts.

Changing an event

I have the following:

<tr onMouseOver="alert('Over a row')">

and I want to modify the event to be:

<tr onMouseOver="alert('Over THIS row')">

in other words reaching into the event, and changing some part of it.

I have tried walking through the attributes of the <truntil I reach
the onMouseOver, then changing its value, but that throws an error.

--
Wojtek :-)
Jul 19 '07 #1
3 1268
Wojtek wrote:
I have the following:

<tr onMouseOver="alert('Over a row')">

and I want to modify the event to be:

<tr onMouseOver="alert('Over THIS row')">

in other words reaching into the event, and changing some part of it.
If you have the tr element object use
tr.onmouseover = function (evt) {
alert('Over THIS row');
};

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 19 '07 #2
Martin Honnen wrote :
Wojtek wrote:
>I have the following:

<tr onMouseOver="alert('Over a row')">

and I want to modify the event to be:

<tr onMouseOver="alert('Over THIS row')">

in other words reaching into the event, and changing some part of it.

If you have the tr element object use
tr.onmouseover = function (evt) {
alert('Over THIS row');
};
I cannot make this work. I still get an object error at that line, and
the original alert text is shown.

browser is IE 6. I tried it with the evt parameter and no parameter

--
Wojtek :-)
Jul 19 '07 #3

Wojtek wrote:
Martin Honnen wrote :
Wojtek wrote:
I have the following:

<tr onMouseOver="alert('Over a row')">

and I want to modify the event to be:

<tr onMouseOver="alert('Over THIS row')">

in other words reaching into the event, and changing some part of it.
If you have the tr element object use
tr.onmouseover = function (evt) {
alert('Over THIS row');
};

I cannot make this work. I still get an object error at that line, and
the original alert text is shown.
Post your code. Did you define tr?

Jul 20 '07 #4

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

Similar topics

4
by: Ant | last post by:
Hi, I'm a Vb6 developer just getting into .Net & I like it! But... How do I change the name of a control, say, a button, once code has been written to it. Even if I delete the old event,...
2
by: S P Arif Sahari Wibowo | last post by:
Hi! Do you know how to put a form's Access-Visual-Basic-code that will force the form to be inserted, while the user has not type anything in the form, without changing focus, selection, etc.? ...
1
by: Wavemaker | last post by:
I was wondering if there is a way to change the value of a control without triggering an event. The ComboBox control, for example, will trigger the SelectedIndexChanged event when its SelectedIndex...
4
by: KK | last post by:
Hi All... For my purpose, I need to handle listbox selection changed event.I must be notified before changing occurs and after.After I can handle using SelectedIndexChanged event.Is there anyway...
4
by: Alexander Mueller | last post by:
Hi all, in a CheckedListBox there are afaics two members that change the checked-flag for an item i.e. SetItemChecked and SetItemCheckState. In the online-help there is a remark that...
2
by: G Gerard | last post by:
Hello I have noticed that whenever I set a form's RecordSource property in code it launches the form's OnActivate event. In one of my application I set a form's RecordSource to zero lenght...
4
by: Robson Siqueira | last post by:
Folks, I am facing a problem. I am trying to manipulate the HTML data (thru the Document and DocumentText properties) of the WebBrowser object (System.Windows.Forms). The problem is that the...
3
by: ICPooreMan | last post by:
The following is a very simple example of what I want to do take an elements oncontextmenu and changing it dynamically onclick of that same element. The code below will fail unless you change the...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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...

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.