Log In · Register

 
Xanga Javascript commands, What are the java controls in xanga?
coldflare
post Jan 19 2005, 01:51 PM
Post #1


Newbie
*

Group: Member
Posts: 2
Joined: Dec 2004
Member No: 67,889



Specifically in the style class, what are the commands used to control the layout with javascript? For example,

style.backgroundColor = #xxxxxx;

can be used to control the color of the backgrounds. Does anyone know how to control font size, family, and color? A simple list of the commands would be a sufficient answer. Thanks!

Cheers, Nate


For further explanation, I'm working on a script that assigns a new background color to each blogentry. I would like to match the font color to the background color, but as of yet I have not been successful. Here's what I have so far; note that I have used the % operator to get the remainder of "ec" when it is divided by 5:

<script>
var blogentry = document.getElementsByTagName("table");
var entries = document.all ? "class"+"Name" : "class";
var colbg = new Array ("#CB2843", "#56CB28", "#7C28CB", "#CB9328", "#284ECB");
var colfn = new Array ("#FFFFFF", "#000000", "#FFFFFF", "#000000", "#FFFFFF");
for (var ec=0; ec < blogentry.length; ec++){
if (blogentry[ec].getAttribute(entries) == "blogbody"){
blogentry[ec].style.backgroundColor = colbg[ec%5];
blogentry[ec].style.(??FONTCOLOR??) = colfn[ec%5];
}}
</script>
 
 
Start new topic
Replies (1 - 2)
avalon*
post Jan 19 2005, 01:54 PM
Post #2


NO. I'm not 13. or 14. or 15. or 16.
*******

Group: Member
Posts: 4,616
Joined: Jul 2004
Member No: 30,577



moved to programming

if someone feels this should be moved back to xanga help, go ahead =)
 
largosama
post Jan 19 2005, 01:58 PM
Post #3


Happy Person
******

Group: Member
Posts: 1,729
Joined: Feb 2004
Member No: 4,674



I think it's a good idea to pm one of the scripters in this forum because anyone else would just be clueless.

Though I would like to ask why not use Id's as a means for manipulation?
 

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: