If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
underline in js  XML
Forum Index » General Discussion
Author Message
dexter_evil
Beginner
[Avatar]

Joined: 17/11/2005 17:59:38
Messages: 15
Location: Poland
Offline

Does anybody know, how to make underline when mouse is over??
I made something like that, but it hasn't worked...
  1. <SCRIPT>   
  2. <!--   
  3. ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));   
  4. function over()   
  5. { if (ie4) {   
  6. event.srcElement.style.cursor="hand";   
  7. event.srcElement.textDecoration="underline"; } } // there I don't know...   
  8. function out(){   
  9. if (ie4)   
  10. { event.srcElement.style.cursor = "auto";   
  11. event.srcElement.textDecoration="none";  // there too...  
  12. } }   
  13. function rozwijanie( object )   
  14. { if (ie4) {   
  15. roller= document.all(object);   
  16. if (roller.style.display == "none")   
  17. { roller.style.display = ""; }   
  18. else   
  19. { roller.style.display = "none"; } }}   
  20. //-->   
  21. </SCRIPT>  

I've heard about function ondecoration but I don't know how to put that in code...
[WWW]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

If we are taslking about for links then it is just CSS.

a { text-decoration: none; }
a:hover { text-decoration: underline; }

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
dexter_evil
Beginner
[Avatar]

Joined: 17/11/2005 17:59:38
Messages: 15
Location: Poland
Offline

No it isn't link, so it's impossible to do that by CSS. I have to make it on js. I know that is possible, but I can't find information about it anywhere...
[WWW]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Hmm I see what you mean.

onMouseOver="this.style.text-decoration='underline'"

doesn't do anything.

Ah it's worded differently

onMouseOver="this.style.textDecoration='underline'" onMouseOut="this.style.textDecoration='none'"

that works. Google is your friend

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » General Discussion
Go to:   
Based on the open source JForum