I am working on an unobtrusive table manipulation script that will delete a row and recreate it with some additional form elements. Firefox works 100%. I thought I took extra care to keep IE happy, but when I first attempted to run the script in IE6, it crashes pretty hard. The crash I get is:
Internet Explorer cannot open the Internet site <<my site>>.

Operation aborted
There are no details that I can see that really help me narrow down the reason, so I've been snipping code until I found the culprit. it appears that using appendChild IE is crashing immediately. Hopefully there is a simple cross browser fix to this? I thought appendChild was pretty straight forward, but I'm usually wrong when it comes to JS.

Here is the trimmed down JS:
Code JavaScript:
function inv_load_attr() {
	if(!document.productForm.p_a_count || document.productForm.p_a_count.value > 1) return false;
	var attributesTable = document.getElementById('product-attributes');
	//create hidden attributes
	if (!window.ActiveXObject) {
		//DOM compliant
		var hidden_formcode = document.createElement('input');
		    hidden_formcode.name = 'p_a_code';
	} else {
		//IE (for support of [document.elementForm.elementName])
		var hidden_formcode = document.createElement('<input name="p_a_code" />');
	    hidden_formcode.type = 'hidden';
	    hidden_formcode.id = 'p_a_code';
	    hidden_formcode.value = 'size_color';

To get an idea of the HTML that this is being used for, here's everything inside of my <body>:

Code HTML:
<form method="post" action="/submit.php" id="productForm" name="productForm">
	<input type="hidden" name="p_a_count" value="1" />
	<table cellspacing="0" id="product-attributes">
			<label for="p_a_value" class="attrLabel required"">Size / Color:</label>
			<input type="hidden" name="p_a_code" value="size_color" />
			<select name="p_a_value" id="p_a_value">
				<option value="">&lt; Select One &gt;</option>
				<option value="S_WHITE">Small / White</option>
				<option value="M_WHITE">Medium / White</option>
				<option value="L_WHITE">Large / White</option>
			</select><br />
	<script type="text/javascript">
	<input type="image" src="/images/submit.gif" alt="Add to Cart" value="Add to Cart" id="cart-submit" class="inputSubmit" />

What am I doing wrong? I have seen .appendChild() being used in other scripts that seem to work in IE. Any thoughts?