Old 10-01-2005, 14:58   #1 (permalink)
coderedone
Registered User
 
Join Date: Jan 2005
Posts: 1
Help me, I'm thick!! ;-)



Im trying to set a dynamicly named variabe ('Name') with 'Value' but it only sets a variable called Name with 'Value' Im sure Im being a numpty. Please HELP ME OUT HERE!!!
+++++++++++++++++++++++++++++++++++++++++++++
for (j=0; j<articleTag.childNodes.length; j++) {
Name = articleTag.childNodes[j].nodeName;
Value = articleTag.childNodes[j].firstChild.nodeValue;
if (Value == null) {
Value = articleTag.childNodes[j].firstChild.firstChild.nodeValue;
}
storie.Name = Value;
trace(Name+" = "+Value);
}
}++++++++++++++++++++++++++++++++++++++++++

Cheers CodeRed
  Reply With Quote
Old 11-01-2005, 05:10   #2 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,126
Try using an array.

array[Name] = Value;
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8