aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes On click I want the hyperlink to get Bold Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "On click I want the hyperlink to get Bold" Watch "On click I want the hyperlink to get Bold" New topic
Author

On click I want the hyperlink to get Bold

Himanshu Gupta
Ranch Hand

Joined: Aug 18, 2008
Posts: 598

I want the hyperlink to get Bold when user clicks on it. Then whenthe user clicks on other Hyperlink the previous bold hyperlink should come to its normal state.

I wrote this Js but hav no idea how to bring back all other hyperlink back to normal font weight.



My Blog SCJP 5 SCWCD 5
Himanshu Gupta
Ranch Hand

Joined: Aug 18, 2008
Posts: 598

Dnt know what happened to the code I posted. here I am posting it again.

--> <li><a href="#" onClick="style.fontWeight='bold'">Theams</a></li>
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
There is a bug with the code tags. You need to uncheck the disable html markup in order for it to work right.

You are not referencing anything, so that should be throwing an error.

you need a reference to the object [link] to do that, you need to use this.

this.style.fontWeight = "bold";

Eric
Himanshu Gupta
Ranch Hand

Joined: Aug 18, 2008
Posts: 598

Thanks Erc for the reply. I left it blank casually.
The problem is solved now.

[]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: On click I want the hyperlink to get Bold
 
Similar Threads
converting html to pdf
HTML drop downs not working
change bgcolor of rows
Add Effect to Link
Hyperlink control in MIDP?