Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS A:Hover to change window.status

Status
Not open for further replies.

jmcg

Technical User
Jun 30, 2000
223
GB
I am looking to recreate the on mouseover action to change the status bar text in a CSS.
Previously would use but do not want to replicate for all potential links
Code:
onMouseover="window.status='Whatever I want'; return true"
Is there a way to do this in a CSS a:hover ?
 
No. infact even IE has now disabled JS from allowing update of the status bar, so i would doubt very much if this will be a CSS implementation as it is considered bad practice to allow the status bar to be manipulated.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
No.
CSS can't do that.

In fact, the status bar is off limits in current browsers (not sure about IE7) even for Javascript.

You would need to use Javascript, but you could create a function that looked for a CSS class or a rel attribute and applied the necessary JS to that element. This would prevent the need for inline JS.

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
That is a JavaScript call only, and cannot be done in CSS. Sorry.
 
Not the answer I wanted but thanks for the quick responses.
 
I know this answer has already been provided, but you should remember something:

[ul][li]CSS stands for Cascading Style Sheets, and can only be used to manipulate the way something looks.[/li][li]JavaScript is scripting language and can interact with users, perform calculations, call functions, etc.[/li][/ul]

While you can use both CSS and JavaScript together, the basic premise remains.



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top