[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.frontpage.programming

Change "active" link appearance

Peter Aitken

4/27/2004 1:42:00 PM

I have what is probably a common setup. A 2-table cell has a list of links
in the left cell and an inline frame in the right cell. Clicking a link
loads the appropriate document into the frame. I want the link to change
appearance - in other words the link for the document that is loaded in the
frame will look different from the other links.

TIA,

--
Peter Aitken

Remove the crap from my email address before using.


6 Answers

Peter Aitken

4/27/2004 8:26:00 PM

0

"Skydolphin" <anonymous@discussions.microsoft.com> wrote in message
news:2EF3F89E-B325-49B9-916E-95B85C5101DB@microsoft.com...
> You just want to change the color of the active link?
>
> alink=#009900 in your body tag. <body alink=#009900...
>
> Hope that's what you are looking for.
>
> Rhonda
>
>

Thanks but - please read my post again.


--
Peter Aitken

Remove the crap from my email address before using.


Steve Easton

4/27/2004 8:29:00 PM

0

She did, and she answered it.

add: body alink=#009900 to the opening body tag of your page. change the color
to one you want.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
"Peter Aitken" <paitken@CRAPnc.rr.com> wrote in message
news:O5PzVXJLEHA.2388@TK2MSFTNGP09.phx.gbl...
> "Skydolphin" <anonymous@discussions.microsoft.com> wrote in message
> news:2EF3F89E-B325-49B9-916E-95B85C5101DB@microsoft.com...
> > You just want to change the color of the active link?
> >
> > alink=#009900 in your body tag. <body alink=#009900...
> >
> > Hope that's what you are looking for.
> >
> > Rhonda
> >
> >
>
> Thanks but - please read my post again.
>
>
> --
> Peter Aitken
>
> Remove the crap from my email address before using.
>
>


Peter Aitken

4/27/2004 8:44:00 PM

0

"Steve Easton" <admin@95isalive.com> wrote in message
news:%23DRmvaJLEHA.3056@TK2MSFTNGP12.phx.gbl...
> She did, and she answered it.
>
> add: body alink=#009900 to the opening body tag of your page. change the
color
> to one you want.
>

My apologies - it does work. Not well, however, because the specified color
takes effect only after the mouse is moved off the link.

In any case I was hoping to change the text itself. For example when Link1
is active:

>>>Link 1
Link 2

And when link 2 is active:

Link 1
>>>Link 2

I though perhaps I could use the onclick event to change the innerText
property of the element but I don't know enough details to figure it out.
Mebbe it's time to buy a Javascript book!

Peter Aitken


Steve Easton

4/27/2004 9:38:00 PM

0

Peter,

There's a way to make the link change when clicked, and stay in that state until
another is clicked.
It's done using an active state in a style section.

Paste this in the head section of your page. Adjust colors and text decoration
as desired.


<style type="text/css">
a{
text-decoration: none;
}
a:link {
background-color: transparent;
color: #0000FF;
text-decoration: underline;
}
a:visited {
background-color: transparent;
color: teal;
text-decoration: none;
}
a:active{
background-color: transparent;
color: red;
text-decoration: none;
}
a:hover {
background-color: transparent;
color: #FF0000;
text-decoration: underline;
}
</style>

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer

"Peter Aitken" <paitken@CRAPnc.rr.com> wrote in message
news:u4gkphJLEHA.340@TK2MSFTNGP11.phx.gbl...
> "Steve Easton" <admin@95isalive.com> wrote in message
> news:%23DRmvaJLEHA.3056@TK2MSFTNGP12.phx.gbl...
> > She did, and she answered it.
> >
> > add: body alink=#009900 to the opening body tag of your page. change the
> color
> > to one you want.
> >
>
> My apologies - it does work. Not well, however, because the specified color
> takes effect only after the mouse is moved off the link.
>
> In any case I was hoping to change the text itself. For example when Link1
> is active:
>
> >>>Link 1
> Link 2
>
> And when link 2 is active:
>
> Link 1
> >>>Link 2
>
> I though perhaps I could use the onclick event to change the innerText
> property of the element but I don't know enough details to figure it out.
> Mebbe it's time to buy a Javascript book!
>
> Peter Aitken
>
>


Peter Aitken

4/27/2004 10:01:00 PM

0

"Steve Easton" <admin@95isalive.com> wrote in message
news:eQJrdBKLEHA.1348@TK2MSFTNGP12.phx.gbl...
> Peter,
>
> There's a way to make the link change when clicked, and stay in that state
until
> another is clicked.
> It's done using an active state in a style section.
>

<snipped>

thanks, Steve, I'll give it a try.


--
Peter Aitken

Remove the crap from my email address before using.


Peter Aitken

4/28/2004 1:06:00 PM

0

"Steve Easton" <admin@95isalive.com> wrote in message
news:eQJrdBKLEHA.1348@TK2MSFTNGP12.phx.gbl...
> Peter,
>
> There's a way to make the link change when clicked, and stay in that state
until
> another is clicked.
> It's done using an active state in a style section.
>
> Paste this in the head section of your page. Adjust colors and text
decoration
> as desired.
>
>

<snipped>

I finally figured this out using a bit of javascript. I assigned an ID
attribute to each link. Then I used the onClick event for each to assign to
the innerText property:

<a onclick="first.innerText='>>Clinical Operations';
second.innerText='Services' " ID="first" target="main"
href="clinops_clinops_frame.htm">&gt;&gt;Clinical Operations</a></p>

<a ID="second" onclick="second.innerText='>>Services';
first.innerText='Clinical Operations'" target="main"
href="clinops_services_frame.htm">Services</a>>

Now the links look like this:

>>Clinical Operations
Services

or this:

Clinical Operations
>>Services

depending on which is current.

Peter Aitken