Connecting Tech Pros Worldwide Forums | Help | Site Map

Interesting Javascript Problem

Gamblingcentre.com
Guest
 
Posts: n/a
#1: Jul 20 '05
I have a sort of complicated problem that I would appreciate any help
I can get with. On my webpage I have a javascript running that
enhances all the links on my page. The script tells ALL the links to
remain blue. However I also have links on the bottom of my page that I
would like to be white, rather then blue. I was just wondering if
there is any possible way to:

1) Create the exact same javascript with the white colors and tell
just my bottom links to run that script, while the rest run on the
blue?

or

2) Is there is any code that I can insert on my webpage that can tell
only my bottom links to ignore the javascript, while the rest of the
page reads it?

Any help you can provide is greatly appreciated!
________________________________
www.gamblingcentre.com
Lucky Lottery Numbers,FREE E-book,
Games,Sports Gambling Tips & Strategies.

Philip Ronan
Guest
 
Posts: n/a
#2: Jul 20 '05

re: Interesting Javascript Problem


On 03.7.20 11:34 PM, Gamblingcentre.com wrote:
[color=blue]
> I have a sort of complicated problem that I would appreciate any help
> I can get with. On my webpage I have a javascript running that
> enhances all the links on my page. The script tells ALL the links to
> remain blue. However I also have links on the bottom of my page that I
> would like to be white, rather then blue.[/color]

Javascript isn't designed for this kind of thing. You need to use CSS.

Here's a link to get you started:
http://www.csscreator.com/css-forum/viewtopic.php?p=101

Phil
--
Philip Ronan
phil.ronanzzz@virgin.net
(Please remove the "z"s if replying by email)


David Dorward
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Interesting Javascript Problem


Gamblingcentre.com wrote:
[color=blue]
> I have a sort of complicated problem that I would appreciate any help
> I can get with. On my webpage I have a javascript running that
> enhances all the links on my page. The script tells ALL the links to
> remain blue.[/color]

Why? That sounds like a very inefficient way to simulate this CSS:

a:link { color: blue; }
a:visited { color: blue; } /* Bad idea! Knowing which links are visible is
something users find useful! */
[color=blue]
> However I also have links on the bottom of my page that I
> would like to be white, rather then blue.[/color]

http://www.allmyfaqs.com/faq.pl?Link...fferent_colors
[color=blue]
> I was just wondering if there is any possible way to:
>
> 1) Create the exact same javascript with the white colors and tell
> just my bottom links to run that script, while the rest run on the
> blue?[/color]

You could give each link a class and test for it in your script.
[color=blue]
> or
>
> 2) Is there is any code that I can insert on my webpage that can tell
> only my bottom links to ignore the javascript, while the rest of the
> page reads it?[/color]

No. Well, short of using frames (eugh) so that they are in a different
document.

--
David Dorward http://david.us-lot.org/
Closed Thread