This is a discussion on "Possible to restyle link target?" within the JavaScript Forum section. This forum, and the thread "Possible to restyle link target? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Possible to restyle link target?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|
|
||||
|
Re: Possible to restyle link target?
I don't understand...
|
|
||||
|
Re: Possible to restyle link target?
Actually, do you mean like the CSS :active? If so, you can use JavaScript. I haven't checked this, but it should work:
|
|
||||
|
Re: Possible to restyle link target?
Sorry, I'll restate. I have a local link on a page: <a href="#nekkidgirl">.
When a user clicks the link and goes to <a name="nekkidgirl">something</a>, I would like for "something" to become boldface or "color:red;" or whatever. I have a great mass of verbiage, and I would like to be able to pick out a phrase by using the link. The solution may lie in the fact that the url changes when the link is clicked. Would it be possible to have a style conditional on the url changing? If you want to see what I'm working on: http://www.dhreport.com/test_interactive/exercise.php PS Thanks for the reply, I stuck it in just for fun and it works fine -- just doesn't do anything I need Last edited by masonbarge; Feb 5th, 2007 at 11:41. |
|
|||
|
Re: Possible to restyle link target?
Have you thought about using JavaScript to extract the anchor from the url when the page loads and then use that piece of information to alter the style for the element whose id or name matches.
|
|
||||
|
Re: Possible to restyle link target?
Could I tie that to a click on the link? Guess I'd better brush up on my js skilz.
|
|
||||
|
Re: Possible to restyle link target?
Um I was thinking about it. You'll need to have an onclick event that styles the link clicked and then unstyles the others. Does that make sense?
|
|
||||
|
Re: Possible to restyle link target?
I'm not sure I've been clear.
I have a long list of radio buttons -- 250+ in three columns --generated from a db. I have links at the top of the page to about 12 of them. When one of these links is clicked, unfortunately you are in a screen full of radio buttons and labels. What I'd like to do is highlight the button/label that is the target of the link, so that if somebody is trying to find it and clicks a link, they can find it easier. I could easily give every one of them a different class with the same style properties, then change the properties of that class. Or, since it's in xhtml, I could use the id property to style them. I think I could do this code in php (of course, it wouldn't work); but my js skilz r l4m3z (: I need to be upping my js anyway, and this is a good project, but I haven't a clue where to start. Last edited by masonbarge; Feb 7th, 2007 at 10:22. |
![]() |
| Tags |
| link, target |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Target _blank | Jack Franklin | Web Page Design | 12 | Oct 12th, 2007 09:55 |
| Target Window Name | jayaramgussy | Web Page Design | 9 | Sep 20th, 2007 22:44 |
| Validating target | Lchad | Web Page Design | 16 | Jan 18th, 2007 13:36 |
| XHTML Target | JacobHaug | Web Page Design | 7 | Jan 4th, 2007 11:55 |
| Frameset target help please | charter | Flash & Multimedia Forum | 4 | Mar 28th, 2004 10:05 |