Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-24-2009, 06:37 PM   PM User | #1
tydymt
New to the CF scene

 
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
tydymt is an unknown quantity at this point
Change tree node style using javascript

Hi everybody,
I have javascript for changing tree node style enumerated in node-list. In document I put list of node-names for changing the style in the hidden field separated by ",". There is one problem:
I want to change style of current node, not of parent node. Could somebody help me? Here is the code:
<code>
// JScript File
ValuePaths = new Array();
ValuePaths_client = new Array();
arrayOf_a = new Array();

function ChangeCss()
{
var browser=navigator.appName;
var b_version=navigator.appVersion;

ValuePaths = document.getElementById("hddnFldValuePaths").value.split(",");
arrayOf_a = document.getElementsByTagName("a");

if(ValuePaths[0] != "")
{
for(q = 0; q < ValuePaths.length; q++)
{
ValuePaths_client[q] = "s" + ValuePaths[q].replace(/\./g, "\\\\");
// alert(ValuePaths_client[q]);
}
}

for(h = 0; h < ValuePaths_client.length; h++)
{
if(ValuePaths_client[h] != "s")
{
for(index = 0; index < arrayOf_a.length; index++)
{
if(arrayOf_a[index].href.indexOf(ValuePaths_client[h]) > -1)
{
arrayOf_a[index].parentNode.getElementsByTagName("input")[0].className = "outline";
}
}
}
}
ValuePaths = new Array();
ValuePaths_client = new Array();
}
</code>
tydymt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:33 PM.


Advertisement
Log in to turn off these ads.