hi,
i have the following javascript

Code:
	<script language="JavaScript">

		var iteration = 0;

		function AddToIngList (form, iteration)
		{

			var it = iteration;

			var Ingredient = form.ingredienttoadd.value;
			form.ingredients_added.value += Ingredient + "\n";

			var objHTML, objText, objinput, objLink;

			objHTML = document.createElement('P');
			objHTML.setAttribute('NAME', 'txtTest');
			objHTML.setAttribute('ID', 'txtTest');
   
			var strTest = form.ingredienttoadd.value;
  			objText = document.createTextNode(strTest);

			var strText = 'http://www.sitepoint.com';
			objLink = document.createElement('A');
			objLink.setAttribute('HREF', 'strText'); 

			objinput = document.createElement
('INPUT');		
			objinput.setAttribute('TYPE', 'text');
			objinput.setAttribute('NAME', 'input'+it);

			form.appendChild(objHTML);		
			objHTML.appendChild(objText);
			objHTML.appendChild(objinput);
			objHTML.appendChild(objLink);
		
		}

	</script>
which is run when a button is clicked. basically it adds text which is retrieved from a drop down box and then creates an input box. this bit works fine. it is the next bit i'm having trouble with. i want also for an <a> tag to be created which, if clicked, removes the text element, input element and the <a> element created.

to make a start i tried to create an <a> element that just leads to an external website which is what i have tried to do in the script above. nothing comes up. i think this may be because what i have above will create <a href = "http://www.sitepoint.com"></a> and there needs to be some text before the </a>tag. i may be wrong, i dont know much about javascript but i think that would make sense.

hope this makes sense and i hope someone can help me out
thanks