Reply
Simulate an OnMouseOver for all links on a page on load? possible?
Old 05-19-2006, 10:24 AM Simulate an OnMouseOver for all links on a page on load? possible?
Novice Talker

Posts: 8
Location: East Sussex, UK
Hi All,

ok you may think...why the hell would someone want to do that?

Well I just do ok!

lol, ok imagine you have a line of 50 cells with links down the left of the page and as you roll over you want the BG color changing.

when rolling over them all in a row, one after the other.
Processor usage goes up and the flash content slows down dramatically until you stop moving the mouse across them.

Using CSS this happens constantly, so as far as i know using CSS to do this isnt gonna work, due to my flash content slowing.

At the moment im using simple onmouse over within the <td> tag.
And this works great in Firefox....you couldnt make it slowdown if you wanted to. However in IE it works Prefectly BUT ONLY after youve rolled over one of the links for the first time. The first rollovers slow everything!

e.g.
i start with my mouse at the top of the 50 links. I run my mouse down the list to get to the bottom link, they all highlight one after the other ...but all flash movies slow while doing this, in turn causing the buttons to highlight with a slight delay.
But now i move back up the list from bottom to the top of the 50 links and they all highlight instantly with no slow down whatsoever.

Firefox is fine on first rollover and any future rollovers.

So my immediate thought is to simulate that first rollover, hoping that then when i use the site it will be working at full speed.

its weird, like they need to cache the first time in IE or something.

Its not an end of the world problem, but more of a bug...thats ...well ...bugging!

any help or an idea, would be most appreciated

a weird one i know...
arcana is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 05-19-2006, 10:27 AM Re: Simulate an OnMouseOver for all links on a page on load? possible?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
That is a weird one.

What I don't understand is why all of the links need to have a background attribute change when you hover over one.

Maybe a URL link so we could see what you're talking about?
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 05-19-2006, 10:49 AM Re: Simulate an OnMouseOver for all links on a page on load? possible?
Novice Talker

Posts: 8
Location: East Sussex, UK
well it needs to have a look like an application (similar to excel) and due to the amount of data show on screen (alot) it needs to have background highlighting, just to make it easy to see where your mouse cursor is....ive actually thought about doing away with it, but its definitely not as user friendly, or plain easy! lol

everyone i ask says CSS, CSS CSSSSSS!!! lol ...but honestly its just not working well with that many links in IE. on large scale things where theres lots of CSS commands going on at once or one after the other very close together, it just doesnt work well.
the onmouseover function to change a BG colour is far quicker when dealing with hovers one after the other(the speed of draggin ones mouse across 50 of them).
I just find it crazy why its slow the first time over and prefect the 2nd rollover only in IE.

I also tried this....ran my mouse down all 50 but missed out link 45 (went round it) then ran down the list again and as soon as it rolled over number 45 ...a second delay that looks real tacky.

maybe internet explorer 7.0 wont have this problem.

and theres the question why dont i just use firefox for it then, well im using this in an application and the 'WebBrowserControl' within the application only uses internet explorer.

its such a minor problem but spending time on an application, and something like that makes the user experience tacky instead of elite. you know what i mean?
arcana is offline
Reply With Quote
View Public Profile
 
Old 05-19-2006, 10:58 AM Re: Simulate an OnMouseOver for all links on a page on load? possible?
Novice Talker

Posts: 8
Location: East Sussex, UK
aside from what im actually trying to acheive in my app, (although im starting to think im using the wrong tool for the wrong job lol) ...is it possible to simulate an onmouse over for all cells in a table. Much like the javascript for highlighting a row of cells in a table when one cell in that row is highlighted.

i would just be interested to see if there is a way, and if so, if it would work or fail miserably lol
arcana is offline
Reply With Quote
View Public Profile
 
Old 05-21-2006, 03:52 AM Re: Simulate an OnMouseOver for all links on a page on load? possible?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Ahhh...you're talking about table row highlighting.

I've never tried this, so don't sue if it don't work , but have you tried tr:hover {
background-color: whatever
}

?
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 05-21-2006, 04:44 AM Re: Simulate an OnMouseOver for all links on a page on load? possible?
chrishirst's Avatar
Super Moderator

Posts: 13,609
Location: Blackpool. UK
it won't work in IE Adam,
pseudo classes on work on anchors <a> rather than on arbitary elements.

I really don't see what you are trying to do, a link to what you have may clarify things

but to highlight a table row you can use
HTML Code:
<table>
<tr onmouseover="this.style.backgroundColor = 'red'" onmouseout="this.style.backgroundColor = ''">
<td>cell</td>
<td>cell</td>
<td>cell</td>
</tr>
</table>
Or if you want to highlight a cell differently so you can see which cell you are on
HTML Code:
<table>
<tr onmouseover="this.style.backgroundColor = 'red'" onmouseout="this.style.backgroundColor = ''">
<td onmouseover="this.style.backgroundColor = 'blue'" onmouseout="this.style.backgroundColor = ''">cell</td>
<td onmouseover="this.style.backgroundColor = 'blue'" onmouseout="this.style.backgroundColor = ''">cell</td>
<td onmouseover="this.style.backgroundColor = 'blue'" onmouseout="this.style.backgroundColor = ''">cell</td>
</tr>
</table>
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Simulate an OnMouseOver for all links on a page on load? possible?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13851 seconds with 12 queries