Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 07-16-2003, 03:08 PM JS Reference for CSS
c2k
c2k's Avatar
Skilled Talker

Posts: 72
Location: Germany
Trades: 0
Hi,
I would like to change the color of the links if the user should like to. I would like to do so with JS. My problem is, that I cannot find any JS that corresponds to the A:Link, A:active, etc.

Does anyone know what the JS tag would be or does at exist?
Any clue?

Thanks for your help.
c2k
c2k is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-16-2003, 03:33 PM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
Trades: 0
I think you are looking for CSS, not JavaScript.

http://www.freewebmasterhelp.com/tutorials/css/
__________________

Please login or register to view this content. Registration is FREE
- Everything a webmaster needs - for free

Please login or register to view this content. Registration is FREE
- Free web hosts reviewed and rated

Please login or register to view this content. Registration is FREE
- Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile
 
Old 07-16-2003, 03:40 PM
c2k
c2k's Avatar
Skilled Talker

Posts: 72
Location: Germany
Trades: 0
Hi,
thanks for your quick reply.

No, actually I am looking for JS.

I would like to change i.e. the link color. I would like to do so by the JS function

Code:
getElementsByTagName()
Well, I need to actually "talk" to the css attribute A:link color.

Example:
To change the border color of a table for example it would be
Code:
getElementsByTagName("table")[i].style.borderColor = document.form1.textfield.value
The problem is, that I do not know how to change the links.
Thanks for you help.
c2k is offline
Reply With Quote
View Public Profile
 
Old 07-17-2003, 03:55 PM
RedMage's Avatar
Average Talker

Posts: 27
Location: ROY UTAH USA
Trades: 0
Try "color" When you access an anchors style with "color" it should refer to "A:LINK { COLOR: # }"
RedMage is offline
Reply With Quote
View Public Profile
 
Old 07-18-2003, 09:22 AM
c2k
c2k's Avatar
Skilled Talker

Posts: 72
Location: Germany
Trades: 0
Hi,
I got it for the link color:
Code:
documet.getElementsByTagName("a")[i].style.color = 'red'
The thing I don't know yet is how to change the color of the visited Links. Does anyone know that?
c2k is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to JS Reference for CSS
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21639 seconds with 12 queries