Topic: Prototype get values of definiton list Pages that link to <a href="https://ozoneasylum.com/backlink?for=31795" title="Pages that link to Topic: Prototype get values of definiton list" rel="nofollow" >Topic: Prototype get values of definiton list\

 
Author Thread
Boudga
Maniac (V) Mad Scientist

From: Jacks raging bile duct....
Insane since: Mar 2000

IP logged posted posted 04-26-2010 16:49 Edit Quote

Hi all,

I have some code in Magento's checkout cart where it lists an H4 tag with class named title followed by a definition list. I would like to use Prototype to get the definition list DD & DT values and write those to a new hidden input value. What I need help with is figuring out how to use Prototype to write those tags to a hidden input as an array of data.

code:
<script type="text/javascript">
   	Event.observe(window, 'load', function() { 
   	allNodes = document.getElementsByClassName("item-options");
   	
   	for(i = 0; i < allNodes.length; i++) {
				var titlelist = allNodes[i].innerHTML;
    		alert(allNodes[i].innerHTML);
			}
		})
</script>



(Edited by Boudga on 04-26-2010 17:58)

coach
Nervous Wreck (II) Inmate

From:
Insane since: May 2011

IP logged posted posted 05-31-2011 11:03 Edit Quote
Edit TP: spam removed


Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu