/    Sign up×
Community /Pin to ProfileBookmark

problem with colours in javascript

Hello ?

Could you help me change colours of visited links in the script [URL=”http://www.javascriptkit.com/script/cut105.shtml”]http://www.javascriptkit.com/script/cut105.shtml[/URL]?
Links appear in remote file.
Please help

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@Kevin2Mar 17.2016 — The page you link to presents code from the last millenium. Colours, be they background, text, visited link, borders and more, should be set with Cascading Style Sheets (CSS).

http://www.w3schools.com/css/default.asp
Copy linkTweet thisAlerts:
@bellebelleauthorMar 17.2016 — Hi Kevin,

thank you for yor help. But it doesn't work. I tried http://www.w3schools.com/css/tryit.asp?filename=trycss_link but in vain, visited links stay the same. Any ideas?
Copy linkTweet thisAlerts:
@Kevin2Mar 17.2016 — in the "try it" code change this:
<a href="default.asp" target="_blank">This is a link</a>
to this:
<a href="xyz.htm" target="_blank">This is a link</a>

An unvisited link is styled to be red. A visited link to green. Watch it change when you click "See Result".
Copy linkTweet thisAlerts:
@bellebelleauthorMar 17.2016 — No, it won't work. The link in the file is <a href="javascript:remote2('http://www.example.com/')">example</a>

How about that?
Copy linkTweet thisAlerts:
@Kevin2Mar 17.2016 — My apologies. I forgot that you can't apply [B]a:visited[/B] to javascript links. Can't do it, don't try. Oddly, [B]a:hover[/B] will work. But all the more reason to not use that ancient, obsolete script in production.
×

Success!

Help @bellebelle spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...